]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - sys/gnu/fs/xfs/FreeBSD/support/sv.h
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / sys / gnu / fs / xfs / FreeBSD / support / sv.h
1 #ifndef __XFS_SUPPORT_SV_H__
2 #define __XFS_SUPPORT_SV_H__
3
4 #include <sys/condvar.h>
5
6 /* 
7  * Synchronisation variables 
8  *
9  * parameters "pri", "svf" and "rts" are not (yet?) implemented
10  *
11  */
12
13 typedef struct cv sv_t;
14
15 #define init_sv(sv,type,name,flag)      cv_init(sv, name)
16 #define sv_init(sv,flag,name)           cv_init(sv, name)
17 /* sv_wait should exit with lock unlocked */
18 #define sv_wait(sv, pri, lock, spl)     cv_wait_unlock(sv, lock)
19 #define sv_wait_sig(sv, pri, lock, spl) cv_wait_sig_nolock(sv, lock)
20 #define sv_signal(sv)                   cv_signal(sv)
21 #define sv_broadcast(sv)                cv_broadcast(sv)
22 #define sv_destroy(sv)                  cv_destroy(sv)
23
24 #define SV_FIFO         0x0             /* sv_t is FIFO type */
25 #define SV_LIFO         0x2             /* sv_t is LIFO type */
26 #define SV_PRIO         0x4             /* sv_t is PRIO type */
27 #define SV_KEYED        0x6             /* sv_t is KEYED type */
28 #define SV_DEFAULT      SV_FIFO
29
30 #endif /* __XFS_SUPPORT_SV_H__ */