OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [posix/] [src/] [pthreadexit.c] - Blame information for rev 173

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
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: pthreadexit.c,v 1.2 2001-09-27 11:59:17 chris Exp $
14
 */
15
 
16
 
17
#include <pthread.h>
18
#include <errno.h>
19
#include <assert.h>
20
 
21
#include <rtems/system.h>
22
#include <rtems/score/thread.h>
23
#include <rtems/posix/pthread.h>
24
 
25
void pthread_exit(
26
  void  *value_ptr
27
)
28
{
29
  Objects_Information     *the_information;
30
 
31
  the_information = _Objects_Get_information( _Thread_Executing->Object.id );
32
 
33
  /* This should never happen if _Thread_Get() works right */
34
  assert( the_information );
35
 
36
  _Thread_Disable_dispatch();
37
 
38
  _Thread_Executing->Wait.return_argument = (unsigned32 *)value_ptr;
39
 
40
  _Thread_Close( the_information, _Thread_Executing );
41
 
42
  _POSIX_Threads_Free( _Thread_Executing );
43
 
44
  _Thread_Enable_dispatch();
45
}
46
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.