24 #ifndef _SEAP_DESCRIPTOR_H
25 #define _SEAP_DESCRIPTOR_H
30 #include "generic/bitmap.h"
31 #include "generic/rbt/rbt.h"
32 #include "_sexp-types.h"
33 #include "_seap-packetq.h"
34 #include "_sexp-parser.h"
35 #include "_sexp-output.h"
36 #include "_seap-command.h"
37 #include "public/seap-scheme.h"
38 #include "public/seap-message.h"
39 #include "public/seap-command.h"
40 #include "public/seap-error.h"
41 #include "../../../common/util.h"
61 pthread_mutex_t w_lock;
62 pthread_mutex_t r_lock;
64 SEAP_cmdid_t next_cid;
69 #define SEAP_DESC_FDIN 0x00000001
70 #define SEAP_DESC_FDOUT 0x00000002
71 #define SEAP_DESC_SELF -1
78 #define SEAP_DESCTBL_INITIALIZER { NULL, NULL }
80 #define SEAP_BUFFER_SIZE 2*4096
81 #define SEAP_MAX_OPENDESC 128
82 #define SDTABLE_REALLOC_ADD 4
92 static inline int SEAP_desc_trylock (pthread_mutex_t *m)
94 switch (pthread_mutex_trylock (m)) {
107 static inline int SEAP_desc_lock (pthread_mutex_t *m)
109 switch (pthread_mutex_lock (m)) {
117 static inline int SEAP_desc_unlock (pthread_mutex_t *m)
119 switch (pthread_mutex_unlock (m)) {
127 #define DESC_TRYRLOCK(d) SEAP_desc_trylock (&((d)->r_lock))
128 #define DESC_RLOCK(d) SEAP_desc_lock (&((d)->r_lock))
129 #define DESC_RUNLOCK(d) SEAP_desc_unlock (&((d)->r_lock))
131 #define DESC_TRYWLOCK(d) SEAP_desc_trylock (&((d)->w_lock))
132 #define DESC_WLOCK(d) SEAP_desc_lock (&((d)->w_lock))
133 #define DESC_WUNLOCK(d) SEAP_desc_unlock (&((d)->w_lock))
Definition: _sexp-parser.h:48
Definition: _seap-packetq.h:16
Definition: _sexp-output.h:36
Definition: seap-descriptor.h:48
Definition: _seap-command.h:68
Definition: seap-descriptor.h:73
Definition: rbt_common.h:129
Definition: sexp-types.h:82
Definition: err_queue.c:30