[5ab9f5]: exit.c Maximize Restore History

Download this file

exit.c    50 lines (41 with data), 1.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* exit.c
*
* Description:
* This translation unit implements routines associated with exiting from
* a thread.
*/
#include "pthread.h"
#include "implement.h"
/*
* Code contributed by John E. Bossom <JEB>.
*/
int
pthread_exit (void *value_ptr)
/*
* ------------------------------------------------------
* DOCPUBLIC
* This function terminates the calling thread, returning
* the value 'value_ptr' to any joining thread.
*
* PARAMETERS
* value_ptr
* a generic data value (i.e. not the address of a value)
*
*
* DESCRIPTION
* This function terminates the calling thread, returning
* the value 'value_ptr' to any joining thread.
* NOTE: thread should be joinable.
*
* RESULTS
* N/A
*
* ------------------------------------------------------
*/
{
_pthread_callUserDestroyRoutines(pthread_getspecific(_pthread_selfThreadKey));
_endthreadex ((unsigned) value_ptr);
return (0);
} /* pthread_exit */
/* </JEB> */