source: rtems/cpukit/posix/src/pthreadexit.c @ aaf6063

4.104.114.84.95
Last change on this file since aaf6063 was f42b726, checked in by Joel Sherrill <joel.sherrill@…>, on 01/24/01 at 14:17:28

2001-01-24 Ralf Corsepius <corsepiu@…>

  • configure.in: Add src/config.h
  • src/Makefile.am: Add INCLUDES += -I. to pickup config.h
  • src/.cvsignore: Add config.h and stamp-h
  • src/*.c: Add config.h support.
  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 *  16.1.5.1 Thread Termination, p1003.1c/Draft 10, p. 150
3 *
4 *  NOTE: Key destructors are executed in the POSIX api delete extension.
5 *
6 *  COPYRIGHT (c) 1989-1999.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.OARcorp.com/rtems/license.html.
12 *
13 *  $Id$
14 */
15
16#if HAVE_CONFIG_H
17#include "config.h"
18#endif
19
20#include <pthread.h>
21#include <errno.h>
22#include <assert.h>
23
24#include <rtems/system.h>
25#include <rtems/score/thread.h>
26#include <rtems/posix/pthread.h>
27
28void pthread_exit(
29  void  *value_ptr
30)
31{
32  Objects_Information     *the_information;
33
34  the_information = _Objects_Get_information( _Thread_Executing->Object.id );
35
36  /* This should never happen if _Thread_Get() works right */
37  assert( the_information );
38
39  _Thread_Disable_dispatch();
40
41  _Thread_Executing->Wait.return_argument = (unsigned32 *)value_ptr;
42
43  _Thread_Close( the_information, _Thread_Executing );
44
45  _POSIX_Threads_Free( _Thread_Executing );
46
47  _Thread_Enable_dispatch();
48}
49
Note: See TracBrowser for help on using the repository browser.