rpm 5.3.7
|
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 /*@-redecl@*/ 00029 /*@unchecked@*/ 00030 extern int _rpmsq_debug; 00031 /*@=redecl@*/ 00032 00033 #if defined(_RPMSQ_INTERNAL) 00034 00037 struct rpmsqElem { 00038 struct rpmsqElem * q_forw; 00039 struct rpmsqElem * q_back; 00040 pid_t child; 00041 volatile pid_t reaped; 00042 volatile int status; 00043 struct rpmop_s op; 00044 rpmtime_t ms_scriptlets; 00045 int reaper; 00046 int pipes[2]; 00047 /*@shared@*/ 00048 void * id; 00049 }; 00050 #endif 00051 00052 /*@-exportlocal@*/ 00053 /*@unchecked@*/ 00054 extern rpmsq rpmsqQueue; 00055 /*@=exportlocal@*/ 00056 00057 /*@unchecked@*/ 00058 extern sigset_t rpmsqCaught; 00059 00060 #ifdef __cplusplus 00061 extern "C" { 00062 #endif 00063 00070 /*@-exportlocal@*/ 00071 int rpmsqInsert(/*@null@*/ void * elem, /*@null@*/ void * prev) 00072 /*@globals rpmsqQueue, systemState @*/ 00073 /*@modifies elem, prev, rpmsqQueue, systemState @*/; 00074 /*@=exportlocal@*/ 00075 00081 /*@-exportlocal@*/ 00082 int rpmsqRemove(/*@null@*/ void * elem) 00083 /*@globals fileSystem, internalState @*/ 00084 /*@modifies elem, fileSystem, internalState @*/; 00085 /*@=exportlocal@*/ 00086 00093 /*@-exportlocal@*/ 00094 void rpmsqAction(int signum, void * info, void * context) 00095 /*@globals rpmsqCaught, rpmsqQueue, errno, fileSystem, internalState @*/ 00096 /*@modifies rpmsqCaught, rpmsqQueue, errno, 00097 fileSystem, internalState @*/; 00098 /*@=exportlocal@*/ 00099 00106 int rpmsqEnable(int signum, /*@null@*/ rpmsqAction_t handler) 00107 /*@globals rpmsqCaught, rpmsqQueue, fileSystem, internalState @*/ 00108 /*@modifies rpmsqCaught, rpmsqQueue, fileSystem, internalState @*/; 00109 00115 pid_t rpmsqFork(rpmsq sq) 00116 /*@globals fileSystem, internalState @*/ 00117 /*@modifies sq, fileSystem, internalState @*/; 00118 00124 pid_t rpmsqWait(rpmsq sq) 00125 /*@globals fileSystem, internalState @*/ 00126 /*@modifies sq, fileSystem, internalState @*/; 00127 00134 void * rpmsqThread(void * (*start) (void * arg), void * arg) 00135 /*@globals internalState @*/ 00136 /*@modifies internalState @*/; 00137 00143 int rpmsqJoin(/*@null@*/ void * thread) 00144 /*@globals internalState @*/ 00145 /*@modifies internalState @*/; 00146 00152 int rpmsqThreadEqual(/*@null@*/ void * thread) 00153 /*@globals internalState @*/ 00154 /*@modifies internalState @*/; 00155 00159 int rpmsqExecve (const char ** argv) 00160 /*@globals fileSystem, internalState @*/ 00161 /*@modifies fileSystem, internalState @*/; 00162 00163 #ifdef __cplusplus 00164 } 00165 #endif 00166 00167 #endif /* H_RPMSQ */