Changeset 1581
- Timestamp:
- Oct 10, 2004, 2:08:10 PM (21 years ago)
- Location:
- trunk/src/emx/src/lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/src/lib/process/beginthr.c
-
Property cvs2svn:cvs-rev
changed from
1.10
to1.11
r1580 r1581 23 23 static void _System threadWrapper(__LIBC_PTHREAD pThrd) 24 24 { 25 LIBCLOG_ENTER("pThrd=%p\n", pThrd);25 LIBCLOG_ENTER("pThrd=%p\n", (void *)pThrd); 26 26 int tid; 27 27 EXCEPTIONREGISTRATIONRECORD reg; 28 28 FS_VAR(); 29 29 30 __libc_threadUse(pThrd); 30 31 __libc_Back_threadStartup(®); 31 LIBCLOG_MSG("calling thread function %p with arg %p\n", pThrd->u.startup.pfnStart, pThrd->u.startup.pvArg); 32 33 LIBCLOG_MSG("calling thread function %p with arg %p\n", (void *)pThrd->u.startup.pfnStart, pThrd->u.startup.pvArg); 32 34 pThrd->u.startup.pfnStart(pThrd->u.startup.pvArg); 33 35 LIBCLOG_MSG("thread function returned\n"); 34 36 37 FS_SAVE_LOAD(); 35 38 __libc_threadTermination(0); 36 tid = _gettid();37 __libc_thread Free(pThrd);39 tid = pThrd->tid; 40 __libc_threadDereference(pThrd); 38 41 __libc_Back_threadEnd(®); 39 42 FS_SAVE_LOAD(); … … 46 49 int _beginthread(void (*pfnStart)(void *), void *pvStack, unsigned cbStack, void *pvArg) 47 50 { 48 LIBCLOG_ENTER("pfnStart=%p pvStart=%p cbStack=%d pvArg=%p\n", pfnStart, pvStack, cbStack, pvArg);51 LIBCLOG_ENTER("pfnStart=%p pvStart=%p cbStack=%d pvArg=%p\n", (void *)pfnStart, pvStack, cbStack, pvArg); 49 52 int rc; 50 53 TID tid; … … 87 90 else 88 91 errno = EINVAL; 89 __libc_thread Free(pThrd);92 __libc_threadDereference(pThrd); 90 93 LIBCLOG_RETURN_INT(-1); 91 94 } … … 96 99 LIBCLOG_ENTER("\n"); 97 100 __LIBC_PTHREAD pThrd = __libc_threadCurrent(); 98 int tid ;101 int tid = pThrd->tid; 99 102 FS_VAR(); 100 103 101 104 __libc_threadTermination(0); 102 tid = _gettid(); 103 __libc_threadFree(pThrd); 105 __libc_threadDereference(pThrd); 104 106 FS_SAVE_LOAD(); 105 107 LIBCLOG_MSG("calling DosExit(%s, 0)\n", tid == 1 ? "EXIT_PROCESS" : "EXIT_THREAD"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/process/thread_internals.c
-
Property cvs2svn:cvs-rev
changed from
1.6
to1.7
r1580 r1581 94 94 * Gain exclusive access to the signal stuff. 95 95 */ 96 #ifdef __NEW_SIGNALS__ 96 97 int rc = __libc_back_signalSemRequest(); 98 #endif 97 99 98 100 /* … … 109 111 * Release semaphore. 110 112 */ 113 #ifdef __NEW_SIGNALS__ 111 114 if (!rc) 112 115 __libc_back_signalSemRelease(); 116 #endif 113 117 } 114 118 else … … 128 132 /* 129 133 * Check that pThrd isn't already in use and set gpTLS to point at pThrd. 130 */ 131 assert(!pThrd->pNext && !pThrd->tid && !*__libc_gpTLS); 134 * (*gpTLS might already be pointing to a temporary structure.) 135 */ 136 assert(!pThrd->pNext && !pThrd->tid); 132 137 *__libc_gpTLS = pThrd; 133 138 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/b_threadInit.c
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r1580 r1581 37 37 38 38 39 void __libc_Back_threadInit(__LIBC_PTHREAD pThrd )39 void __libc_Back_threadInit(__LIBC_PTHREAD pThrd, const __LIBC_PTHREAD pParentThrd) 40 40 { 41 41 unsigned i; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/b_threadStartup.c
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r1580 r1581 37 37 #include <InnoTekLIBC/backend.h> 38 38 39 void __libc_Back_threadStartup(void *pExpRegRec , const __LIBC_PTHREAD pParentThrd)39 void __libc_Back_threadStartup(void *pExpRegRec) 40 40 { 41 41 FS_VAR(); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/sharedpm.c
-
Property cvs2svn:cvs-rev
changed from
1.10
to1.11
r1580 r1581 900 900 * This is mostly because we wanna crash before we take the sem. 901 901 */ 902 #ifdef SIGRTMAX /* just make it build. */ 902 903 if (pSignal->si_signo <= 0 || pSignal->si_signo > SIGRTMAX) 903 904 { … … 905 906 LIBCLOG_RETURN_INT(-EINVAL); 906 907 } 908 #endif 907 909 if (pSignal->auReserved[(sizeof(pSignal->auReserved) / sizeof(pSignal->auReserved[0])) - 1]) 908 910 { -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.