Changeset 2211
- Timestamp:
- Jul 6, 2005, 5:45:59 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/src/emx/src/lib/sys/b_processWait.c (modified) (8 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/src/lib/sys/b_processWait.c
-
Property cvs2svn:cvs-rev
changed from
1.8to1.9
r2210 r2211 50 50 #include <InnoTekLIBC/backend.h> 51 51 #include <InnoTekLIBC/FastInfoBlocks.h> 52 52 53 #define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_PROCESS 53 54 #include <InnoTekLIBC/logstrict.h> … … 119 120 /** List of known children. */ 120 121 static volatile PWAITCHILD gpChildrenHead; 122 123 121 124 /** Number of known child processes. */ 122 125 static volatile unsigned gcChildren; … … 149 152 static int waitAllocInsert(const PWAITINFO pWaitInsert); 150 153 static inline void waitInfoToSigInfo(const PWAITINFO pWait, siginfo_t *pSigInfo); 154 151 155 152 156 … … 192 196 if (gtidThread) 193 197 { 194 /* kill the thread */198 /* kill the thread */ 195 199 __atomic_xchg(&gfTerminate, 1); 196 200 DosKillThread(gtidThread); … … 214 218 DosPostEventSem(hev); 215 219 DosCloseEventSem(hev); 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 216 257 } 217 258 } … … 328 369 else 329 370 gpChildrenHead = pChild->pNext; 371 372 330 373 __atomic_decrement_min(&gcChildren, 0); 331 374 break; … … 570 613 void __libc_back_processWaitNotifyExec(pid_t pid) 571 614 { 572 PWAITCHILD pChild = _hmalloc(sizeof(*pChild)); 573 waitSemRequest(0); 615 /* 616 * Allocate and enter semaphore protection. 617 */ 618 PWAITCHILD pChild = NULL; 619 if (gpChildrenFree) 620 { 621 waitSemRequest(0); 622 pChild = gpChildrenFree; 623 if (pChild) 624 gpChildrenFree = pChild->pNext; 625 else 626 waitSemRelease(); 627 } 628 if (!pChild) 629 { 630 pChild = _hmalloc(sizeof(*pChild)); 631 waitSemRequest(0); 632 } 574 633 575 634 /* … … 979 1038 rc, pSigInfo->si_pid, pSigInfo->si_code, pSigInfo->si_status); 980 1039 } 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.
