diff options
| author | rpj <rpj> | 2000-08-18 08:02:29 +0000 | 
|---|---|---|
| committer | rpj <rpj> | 2000-08-18 08:02:29 +0000 | 
| commit | 11eb4dfd2d42417327fc205c649ea32ee623cf92 (patch) | |
| tree | 79b7a28890e779a4cc8d77e9289dba919d371bdd /exit.c | |
| parent | 88de1621e4371cd118e1a98c9c08ff23c46e6899 (diff) | |
2000-08-18  Ross Johnson  <rpj@setup1.ise.canberra.edu.au>
        * Several: Fix typos from scripted edit session
        yesterday.
        * nonportable.c (pthread_mutexattr_setforcecs_np):
        Moved this function from mutex.c.
        (pthread_getw32threadhandle_np): New function to
        return the win32 thread handle that the POSIX
        thread is using.
        * mutex.c (pthread_mutexattr_setforcecs_np):
        Moved to new file "nonportable.c".
        * pthread.h (PTW32_BUILD): Only redefine __except
        and catch compiler keywords if we aren't building
        the library (ie. PTW32_BUILD is not defined) -
        this is safer than defining and then undefining
        if not building the library.
        * implement.h: Remove __except and catch undefines.
        * Makefile (CFLAGS): Define PTW32_BUILD.
        * GNUmakefile (CFLAGS): Define PTW32_BUILD.
        * All appropriate: Change Pthread_exception* to
        ptw32_exception* to be consistent with internal
        identifier naming.
        * private.c (ptw32_throw): New function to provide
        a generic exception throw for all internal
        exceptions and EH schemes.
        (ptw32_threadStart): pthread_exit() value is now
        returned via the thread structure exitStatus
        element.
        * exit.c (pthread_exit): pthread_exit() value is now
        returned via the thread structure exitStatus
        element.
        * cancel.c (ptw32_cancel_self): Now uses ptw32_throw.
        (pthread_setcancelstate): Ditto.
        (pthread_setcanceltype): Ditto.
        (pthread_testcancel): Ditto.
        (pthread_cancel): Ditto.
        * misc.c (CancelableWait): Ditto.
        * exit.c (pthread_exit): Ditto.
        * All applicable: Change PTW32_ prefix to
        PTW32_ prefix to remove leading underscores
        from private library identifiers.
Diffstat (limited to 'exit.c')
| -rw-r--r-- | exit.c | 42 | 
1 files changed, 2 insertions, 40 deletions
| @@ -53,12 +53,6 @@ pthread_exit (void *value_ptr)  {    pthread_t self; -#if defined(_MSC_VER) && !defined(__cplusplus) - -  DWORD exceptionInformation[3]; - -#endif -    /* If the current thread is implicit it was not started through       pthread_create(), therefore we cleanup and end the thread       here. Otherwise we raise an exception to unwind the exception @@ -70,7 +64,7 @@ pthread_exit (void *value_ptr)    if (self == NULL || self->implicit)      { -      ptw32_allUserDestroyRoutines(self); +      ptw32_callUserDestroyRoutines(self);  #if ! defined (__MINGW32__) || defined (__MSVCRT__)        _endthreadex ((unsigned) value_ptr); @@ -83,39 +77,7 @@ pthread_exit (void *value_ptr)    self->exitStatus = value_ptr; -#if defined(_MSC_VER) && !defined(__cplusplus) - -  exceptionInformation[0] = (DWORD) (_PTHREAD_EPS_EXIT); -  exceptionInformation[1] = (DWORD) (value_ptr); -  exceptionInformation[2] = (DWORD) (0); - -  RaiseException ( -		  EXCEPTION_PTHREAD_SERVICES, -		  0, -		  3, -		  exceptionInformation); - -#else /* ! _MSC_VER */ - -#ifdef __cplusplus - -  throw Pthread_exception_exit(); - -#else /* ! __cplusplus */ - -  (void) pthread_pop_cleanup( 1 ); - -  ptw32_callUserDestroyRoutines(self); - -#if ! defined (__MINGW32__) || defined (__MSVCRT__) -  _endthreadex ((unsigned) value_ptr); -#else -  _endthread (); -#endif - -#endif /* __cplusplus */ - -#endif /* _MSC_VER */ +  ptw32_throw(PTW32_EPS_EXIT);    /* Never reached. */ | 
