Changeset 1581


Ignore:
Timestamp:
Oct 10, 2004, 2:08:10 PM (21 years ago)
Author:
bird
Message:

...

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 to 1.11
    r1580 r1581  
    2323static void _System threadWrapper(__LIBC_PTHREAD pThrd)
    2424{
    25     LIBCLOG_ENTER("pThrd=%p\n", pThrd);
     25    LIBCLOG_ENTER("pThrd=%p\n", (void *)pThrd);
    2626    int                         tid;
    2727    EXCEPTIONREGISTRATIONRECORD reg;
    2828    FS_VAR();
    2929
     30    __libc_threadUse(pThrd);
    3031    __libc_Back_threadStartup(&reg);
    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);
    3234    pThrd->u.startup.pfnStart(pThrd->u.startup.pvArg);
    3335    LIBCLOG_MSG("thread function returned\n");
    3436
     37    FS_SAVE_LOAD();
    3538    __libc_threadTermination(0);
    36     tid = _gettid();
    37     __libc_threadFree(pThrd);
     39    tid = pThrd->tid;
     40    __libc_threadDereference(pThrd);
    3841    __libc_Back_threadEnd(&reg);
    3942    FS_SAVE_LOAD();
     
    4649int _beginthread(void (*pfnStart)(void *), void *pvStack, unsigned cbStack, void *pvArg)
    4750{
    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);
    4952    int             rc;
    5053    TID             tid;
     
    8790    else
    8891        errno = EINVAL;
    89     __libc_threadFree(pThrd);
     92    __libc_threadDereference(pThrd);
    9093    LIBCLOG_RETURN_INT(-1);
    9194}
     
    9699    LIBCLOG_ENTER("\n");
    97100    __LIBC_PTHREAD  pThrd = __libc_threadCurrent();
    98     int             tid;
     101    int             tid = pThrd->tid;
    99102    FS_VAR();
    100103
    101104    __libc_threadTermination(0);
    102     tid = _gettid();
    103     __libc_threadFree(pThrd);
     105    __libc_threadDereference(pThrd);
    104106    FS_SAVE_LOAD();
    105107    LIBCLOG_MSG("calling DosExit(%s, 0)\n", tid == 1 ? "EXIT_PROCESS" : "EXIT_THREAD");
  • trunk/src/emx/src/lib/process/thread_internals.c

    • Property cvs2svn:cvs-rev changed from 1.6 to 1.7
    r1580 r1581  
    9494         * Gain exclusive access to the signal stuff.
    9595         */
     96#ifdef __NEW_SIGNALS__
    9697        int rc = __libc_back_signalSemRequest();
     98#endif
    9799
    98100        /*
     
    109111         * Release semaphore.
    110112         */
     113#ifdef __NEW_SIGNALS__
    111114        if (!rc)
    112115            __libc_back_signalSemRelease();
     116#endif
    113117    }
    114118    else
     
    128132    /*
    129133     * 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);
    132137    *__libc_gpTLS = pThrd;
    133138
  • trunk/src/emx/src/lib/sys/b_threadInit.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r1580 r1581  
    3737
    3838
    39 void __libc_Back_threadInit(__LIBC_PTHREAD pThrd)
     39void __libc_Back_threadInit(__LIBC_PTHREAD pThrd, const __LIBC_PTHREAD pParentThrd)
    4040{
    4141    unsigned        i;
  • trunk/src/emx/src/lib/sys/b_threadStartup.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r1580 r1581  
    3737#include <InnoTekLIBC/backend.h>
    3838
    39 void __libc_Back_threadStartup(void *pExpRegRec, const __LIBC_PTHREAD pParentThrd)
     39void __libc_Back_threadStartup(void *pExpRegRec)
    4040{
    4141    FS_VAR();
  • trunk/src/emx/src/lib/sys/sharedpm.c

    • Property cvs2svn:cvs-rev changed from 1.10 to 1.11
    r1580 r1581  
    900900     * This is mostly because we wanna crash before we take the sem.
    901901     */
     902#ifdef SIGRTMAX                         /* just make it build. */
    902903    if (pSignal->si_signo <= 0 || pSignal->si_signo > SIGRTMAX)
    903904    {
     
    905906        LIBCLOG_RETURN_INT(-EINVAL);
    906907    }
     908#endif
    907909    if (pSignal->auReserved[(sizeof(pSignal->auReserved) / sizeof(pSignal->auReserved[0])) - 1])
    908910    {
Note: See TracChangeset for help on using the changeset viewer.