source: rtems/cpukit/posix/src/pthreadexit.c @ 6c06288

4.104.114.95
Last change on this file since 6c06288 was 6c06288, checked in by Joel Sherrill <joel.sherrill@…>, on 01/29/08 at 21:52:21

2008-01-29 Joel Sherrill <joel.sherrill@…>

  • itron/src/exd_tsk.c, itron/src/task.c, libmisc/capture/capture.c, libmisc/monitor/mon-config.c, libmisc/monitor/mon-driver.c, libmisc/monitor/mon-itask.c, libmisc/monitor/mon-monitor.c, libmisc/monitor/mon-mpci.c, libmisc/monitor/mon-object.c, libmisc/monitor/mon-symbols.c, posix/src/cancelrun.c, posix/src/pthreadexit.c, rtems/Makefile.am, rtems/preinstall.am, rtems/include/rtems.h, rtems/include/rtems/rtems/support.h, rtems/inline/rtems/rtems/tasks.inl, rtems/src/eventmp.c, rtems/src/msgmp.c, rtems/src/partmp.c, rtems/src/regionmp.c, rtems/src/rtemsobjectgetname.c, rtems/src/semmp.c, rtems/src/signalmp.c, rtems/src/taskdelete.c, rtems/src/taskmp.c, rtems/src/timerserver.c, score/Makefile.am, score/include/rtems/score/object.h, score/inline/rtems/score/object.inl, score/src/Unlimited.txt, score/src/objectgetnameasstring.c, score/src/threadqextractwithproxy.c: Add new Object Services collection. This changed the name of a few previously public but undocumented services and added a some new services.
  • rtems/include/rtems/rtems/object.h, rtems/src/rtemsbuildid.c, rtems/src/rtemsbuildname.c, rtems/src/rtemsobjectapimaximumclass.c, rtems/src/rtemsobjectapiminimumclass.c, rtems/src/rtemsobjectgetapiclassname.c, rtems/src/rtemsobjectgetapiname.c, rtems/src/rtemsobjectgetclassicname.c, rtems/src/rtemsobjectgetclassinfo.c, rtems/src/rtemsobjectidapimaximum.c, rtems/src/rtemsobjectidapiminimum.c, rtems/src/rtemsobjectidgetapi.c, rtems/src/rtemsobjectidgetclass.c, rtems/src/rtemsobjectidgetindex.c, rtems/src/rtemsobjectidgetnode.c, rtems/src/rtemsobjectsetname.c, score/src/objectapimaximumclass.c, score/src/objectgetinfo.c, score/src/objectgetinfoid.c, score/src/objectsetname.c: New files.
  • rtems/src/rtemsidtoname.c: Removed.
  • 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-2008.
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_id( _Thread_Executing->Object.id );
35
36  /*
37   * the_information has to be non-NULL.  Otherwise, we couldn't be
38   * running in a thread of this API and class.
39   */
40 
41  _Thread_Disable_dispatch();
42
43  _Thread_Executing->Wait.return_argument = value_ptr;
44
45  _Thread_Close( the_information, _Thread_Executing );
46
47  _POSIX_Threads_Free( _Thread_Executing );
48
49  _Thread_Enable_dispatch();
50}
Note: See TracBrowser for help on using the repository browser.