source: rtems/cpukit/posix/src/pthreadexit.c @ 860c34e

4.104.114.95
Last change on this file since 860c34e was 3239698, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/15/04 at 13:26:21

Remove stray white spaces.

  • 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.rtems.com/license/LICENSE.
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 = value_ptr;
42
43  _Thread_Close( the_information, _Thread_Executing );
44
45  _POSIX_Threads_Free( _Thread_Executing );
46
47  _Thread_Enable_dispatch();
48}
Note: See TracBrowser for help on using the repository browser.