renaming Ast_defs `class_kind` into `classish_kind`
[hiphop-php.git] / hphp / neo / ulocks.h
blob4f113f25f359fd6a82f2195ea07941eb46399661
1 /*
3 * Thread-safe Skiplist Using Integer Identifiers
4 * Copyright 1998-2000 Scott Shambarger (scott@shambarger.net)
6 * This software is open source. Permission to use, copy, modify, and
7 * distribute this software for any purpose and without fee is hereby granted,
8 * provided that the above copyright notice appear in all copies. No
9 * warranty of any kind is expressed or implied. Use at your own risk.
11 * 1/14/2001 blong
12 * Made it use neo errs... probably need to check locking functions
13 * for error returns...
17 #ifndef incl_HPHP_ULOCKS_H_
18 #define incl_HPHP_ULOCKS_H_
20 #ifdef HAVE_PTHREADS
22 #include <pthread.h>
24 NEOERR *mLock(pthread_mutex_t *mutex);
26 * Function: mLock - lock a mutex.
27 * Description: Locks the mutex <mutex>. This call blocks until the mutex
28 * is acquired.
29 * Input: mutex - mutex to lock.
30 * Output: None.
31 * Return: STATUS_OK on success
32 * NERR_LOCK on failure
33 * MT-Level: Safe.
36 NEOERR *mUnlock(pthread_mutex_t *mutex);
38 * Function: mUnlock - unlock a mutex.
39 * Description: Unlocks the mutex <mutex>.
40 * Input: mutex - mutex to unlock.
41 * Output: None.
42 * Return: STATUS_OK on success
43 * NERR_LOCK on failure
44 * MT-Level: Safe.
47 #endif /* HAVE_PTHREAD */
49 #endif /* incl_HPHP_ULOCKS_H_ */