Use enum to define key types.
Suggested by: jmallett
This commit is contained in:
parent
4904f91fe0
commit
73532aa78c
@ -58,14 +58,16 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <compat/freebsd32/freebsd32_proto.h>
|
#include <compat/freebsd32/freebsd32_proto.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TYPE_SIMPLE_WAIT 0
|
enum {
|
||||||
#define TYPE_CV (TYPE_SIMPLE_WAIT+1)
|
TYPE_SIMPLE_WAIT,
|
||||||
#define TYPE_SEM (TYPE_CV+1)
|
TYPE_CV,
|
||||||
#define TYPE_SIMPLE_LOCK (TYPE_SEM+1)
|
TYPE_SEM,
|
||||||
#define TYPE_NORMAL_UMUTEX (TYPE_SIMPLE_LOCK+1)
|
TYPE_SIMPLE_LOCK,
|
||||||
#define TYPE_PI_UMUTEX (TYPE_NORMAL_UMUTEX+1)
|
TYPE_NORMAL_UMUTEX,
|
||||||
#define TYPE_PP_UMUTEX (TYPE_PI_UMUTEX+1)
|
TYPE_PI_UMUTEX,
|
||||||
#define TYPE_RWLOCK (TYPE_PP_UMUTEX+1)
|
TYPE_PP_UMUTEX,
|
||||||
|
TYPE_RWLOCK
|
||||||
|
};
|
||||||
|
|
||||||
#define _UMUTEX_TRY 1
|
#define _UMUTEX_TRY 1
|
||||||
#define _UMUTEX_WAIT 2
|
#define _UMUTEX_WAIT 2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user