generated from CSED421-DBS/EduBfM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEduBfM_SetDirty.c
77 lines (66 loc) · 3.18 KB
/
EduBfM_SetDirty.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/******************************************************************************/
/* */
/* ODYSSEUS/EduCOSMOS Educational-Purpose Object Storage System */
/* */
/* Developed by Professor Kyu-Young Whang et al. */
/* */
/* Database and Multimedia Laboratory */
/* */
/* Computer Science Department and */
/* Advanced Information Technology Research Center (AITrc) */
/* Korea Advanced Institute of Science and Technology (KAIST) */
/* */
/* e-mail: kywhang@cs.kaist.ac.kr */
/* phone: +82-42-350-7722 */
/* fax: +82-42-350-8380 */
/* */
/* Copyright (c) 1995-2013 by Kyu-Young Whang */
/* */
/* All rights reserved. No part of this software may be reproduced, */
/* stored in a retrieval system, or transmitted, in any form or by any */
/* means, electronic, mechanical, photocopying, recording, or otherwise, */
/* without prior written permission of the copyright owner. */
/* */
/******************************************************************************/
/*
* Module: EduBfM_SetDirty.c
*
* Description:
* Set the dirty bit of an entry in the buffer table.
*
* Exports:
* Four EduBfM_SetDirty(TrainID*, Four)
*
* Notes:
* This function should be called if the user modify the buffer.
*/
#include "EduBfM_common.h"
#include "EduBfM_Internal.h"
/*@================================
* EduBfM_SetDirty()
*================================*/
/*
* Function: Four EduBfM_SetDirty(TrainID*, Four)
*
* Description:
* (Following description is for original ODYSSEUS/COSMOS BfM.
* For ODYSSEUS/EduCOSMOS EduBfM, refer to the EduBfM project manual.)
*
* Set the dirty bit of an entry in the buffer table.
* Look up the entry in the using given parameters and set the dirty
* bit of the entry.
*
* Returns:
* error code
* eBADBUFFERTYPE_BFM - bad buffer type
* some errors caused by function calls
*/
Four EduBfM_SetDirty(
TrainID *trainId, /* IN which train has been modified in the buffer? */
Four type ) /* IN buffer type */
{
Four index; /* an index of the buffer table & pool */
/*@ Is the paramter valid? */
if (IS_BAD_BUFFERTYPE(type)) ERR(eBADBUFFERTYPE_BFM);
return( eNOERROR );
} /* EduBfM_SetDirty */