@@ -157,7 +157,7 @@ typedef unsigned long long PTR_OFFSET;
157157 ** @param shm_size: The size of the shared memory.
158158 ** @param entry_num:The number of entries in the shared memory.
159159 ** return: AGMDB_SUCCESS if success,
160- **AGMDB_FAIL if failed.
160+ **AGMDB_ERROR if failed.
161161 */
162162int SHM_init (PTR_VOID shm_base ,unsignedint shm_size ,int entry_num );
163163
@@ -254,7 +254,7 @@ int Entry_insertSpareList(CPTR_VOID shm_base, PTR_VOID* spare_list_head, PTR_OFF
254254 ** @param spare_list_head: The head of spare linklist.
255255 ** @param entry_id: The index of gotten entry.
256256 ** return: AGMDB_SUCCESS if success,
257- AGMDB_FAIL if failed.
257+ AGMDB_ERROR if failed.
258258 */
259259int Entry_removeSpareList (CPTR_VOID shm_base ,PTR_VOID * spare_list_head ,PTR_OFFSET entry_id );
260260
@@ -264,7 +264,7 @@ int Entry_removeSpareList(CPTR_VOID shm_base, PTR_VOID* spare_list_head, PTR_OFF
264264 ** @param hash_list_head: The head of spare linklist.
265265 ** @param entry_id: The index of entry you want to insert.
266266 ** return: AGMDB_SUCCESS if success,
267- AGMDB_FAIL if failed.
267+ AGMDB_ERROR if failed.
268268 */
269269int Entry_insertHashList (CPTR_VOID shm_base ,PTR_VOID * hash_list_head ,PTR_OFFSET entry_id );
270270
@@ -273,7 +273,7 @@ int Entry_insertHashList(CPTR_VOID shm_base, PTR_VOID* hash_list_head, PTR_OFFSE
273273 ** @param shm_base: The base address of shared memory.
274274 ** @param entry_id: The index of entry you want to remove.
275275 ** return: AGMDB_SUCCESS if success,
276- AGMDB_FAIL if failed.
276+ AGMDB_ERROR if failed.
277277 */
278278int Entry_removeHashList (CPTR_VOID shm_base ,PTR_OFFSET entry_id );
279279
@@ -284,7 +284,7 @@ int Entry_removeHashList(CPTR_VOID shm_base, PTR_OFFSET entry_id);
284284 ** @param time_list_head: The head of expiration time linklist.
285285 ** @param time_list_tail: The tail of expiration time linklist.
286286 ** return: AGMDB_SUCCESS if success,
287- AGMDB_FAIL if failed.
287+ AGMDB_ERROR if failed.
288288 */
289289int Entry_insertTimeList (CPTR_VOID shm_base ,PTR_OFFSET entry_id ,PTR_VOID * time_list_head ,PTR_VOID * time_list_tail );
290290
@@ -295,7 +295,7 @@ int Entry_insertTimeList(CPTR_VOID shm_base, PTR_OFFSET entry_id, PTR_VOID* time
295295 ** @param time_list_head: The head of expiration time linklist.
296296 ** @param time_list_tail: The tail of expiration time linklist.
297297 ** return: AGMDB_SUCCESS if success,
298- AGMDB_FAIL if failed.
298+ AGMDB_ERROR if failed.
299299 */
300300int Entry_removeTimeList (CPTR_VOID shm_base ,PTR_OFFSET entry_id ,PTR_VOID * time_list_head ,PTR_VOID * time_list_tail );
301301
@@ -305,7 +305,7 @@ int Entry_removeTimeList(CPTR_VOID shm_base, PTR_OFFSET entry_id, PTR_VOID* time
305305 ** @param key: The key you want to search.
306306 ** @param hashmap_index: The hash index of the linklist you want to search.
307307 ** return: The entry's offset if found,
308- orAGMDB_FAIL_P if not found.
308+ orAGMDB_ERROR_P if not found.
309309 */
310310PTR_OFFSET Entry_searchHashlist (CPTR_VOID shm_base ,const char * key ,unsignedint hashmap_index );
311311
@@ -318,7 +318,7 @@ PTR_OFFSET Entry_searchHashlist(CPTR_VOID shm_base, const char* key, unsigned in
318318 ** @param value: The value string.
319319 ** @param value: The length of value string.
320320 ** return: AGMDB_SUCCESS if success
321- orAGMDB_FAIL if fail
321+ orAGMDB_ERROR if fail
322322 */
323323int Entry_setKeyValue (PTR_OFFSET entry_id ,const char * key ,int key_len ,const char * value ,int value_len );
324324
@@ -364,7 +364,7 @@ union semun{
364364 ** @param lock_num: The number of atom lock in the agmdb_lock sturcture. Default is 2 (read lock and write lock).
365365 ** return: AGMDB_SUCCESS_LOCK_CREATE if successfully created a new lock,
366366 ** AGMDB_SUCCESS_LOCK_OPEN if successfully link to an existed lock,
367- **AGMDB_FAIL if failed.
367+ **AGMDB_ERROR if failed.
368368 */
369369int Lock_create (struct agmdb_lock * new_lock ,int lock_id ,int lock_num );
370370
@@ -390,7 +390,7 @@ int Lock_close(struct agmdb_lock *db_lock);
390390 ** @param index: The index of atom lock (read or write) .
391391 ** @param val: The value you want to decrease from the lock.
392392 ** return: AGMDB_SUCCESS if success;
393- ** orAGMDB_FAIL if failed
393+ ** orAGMDB_ERROR if failed
394394 */
395395int Lock_P (const struct agmdb_lock * db_lock ,int index ,int val );
396396
@@ -400,7 +400,7 @@ int Lock_P(const struct agmdb_lock *db_lock, int index, int val);
400400 ** @param index: The index of atom lock (read or write) .
401401 ** @param val: The value you want to add to the lock.
402402 ** return: AGMDB_SUCCESS if success;
403- ** orAGMDB_FAIL if failed
403+ ** orAGMDB_ERROR if failed
404404 */
405405int Lock_V (const struct agmdb_lock * db_lock ,int index ,int val );
406406
@@ -415,7 +415,7 @@ int Lock_V(const struct agmdb_lock *db_lock, int index, int val);
415415 ** @param str: the string you want to check.
416416 ** @param str_len: given string length (not include '\0').
417417 ** return: AGMDB_SUCCESS if the string length equals str_len;
418- **AGMDB_FAIL if not
418+ **AGMDB_ERROR if not
419419 */
420420int AGMDB_isstring (const char * str ,int str_len );
421421
@@ -425,7 +425,7 @@ int AGMDB_isstring(const char* str, int str_len);
425425 ** @param key_len: the length of the key string.
426426 ** @param output_val_range: the range of output value.
427427 ** return: hash result if success
428- ** orAGMDB_FAIL if failed.
428+ ** orAGMDB_ERROR if failed.
429429 */
430430unsignedint AGMDB_hash (const char * key ,int key_len ,unsignedint output_val_range );
431431