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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [cpukit/] [posix/] [src/] [pthreadexit.c] - Blame information for rev 1026

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*
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
 *  pthreadexit.c,v 1.4 2001/01/24 14:17:28 joel Exp
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
 
28
void 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
 

powered by: WebSVN 2.1.0

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