00001 #ifndef H_RPMSQ
00002 #define H_RPMSQ
00003
00009 #include <rpmsw.h>
00010
00013 typedef struct rpmsig_s * rpmsig;
00014
00017 typedef struct rpmsqElem * rpmsq;
00018
00025 typedef void (*rpmsqAction_t) (int signum, void * info, void * context)
00026 ;
00027
00028
00029
00030 extern int _rpmsq_debug;
00031
00032
00036 struct rpmsqElem {
00037 struct rpmsqElem * q_forw;
00038 struct rpmsqElem * q_back;
00039 pid_t child;
00040 volatile pid_t reaped;
00041 volatile int status;
00042 struct rpmop_s op;
00043 rpmtime_t ms_scriptlets;
00044 int reaper;
00045 int pipes[2];
00046
00047 void * id;
00048 pthread_mutex_t mutex;
00049 pthread_cond_t cond;
00050 };
00051
00052
00053
00054 extern rpmsq rpmsqQueue;
00055
00056
00057
00058 extern sigset_t rpmsqCaught;
00059
00060 #ifdef __cplusplus
00061 {
00062 #endif
00063
00070
00071 int rpmsqInsert( void * elem, void * prev)
00072
00073 ;
00074
00075
00081
00082 int rpmsqRemove( void * elem)
00083
00084 ;
00085
00086
00093
00094 void rpmsqAction(int signum, void * info, void * context)
00095
00096 ;
00097
00098
00105 int rpmsqEnable(int signum, rpmsqAction_t handler)
00106
00107 ;
00108
00114 pid_t rpmsqFork(rpmsq sq)
00115
00116 ;
00117
00123 pid_t rpmsqWait(rpmsq sq)
00124
00125 ;
00126
00133 void * rpmsqThread(void * (*start) (void * arg), void * arg)
00134
00135 ;
00136
00142 int rpmsqJoin( void * thread)
00143
00144 ;
00145
00151 int rpmsqThreadEqual( void * thread)
00152
00153 ;
00154
00158 int rpmsqExecve (const char ** argv)
00159
00160 ;
00161
00162 #ifdef __cplusplus
00163 }
00164 #endif
00165
00166 #endif