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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 30 unneback
/*
2
 *  $Id: testcancel.c,v 1.2 2001-09-27 11:59:17 chris Exp $
3
 */
4
 
5
#include <pthread.h>
6
#include <errno.h>
7
 
8
#include <rtems/system.h>
9
#include <rtems/score/chain.h>
10
#include <rtems/score/isr.h>
11
#include <rtems/score/thread.h>
12
#include <rtems/score/wkspace.h>
13
#include <rtems/posix/cancel.h>
14
#include <rtems/posix/pthread.h>
15
#include <rtems/posix/threadsup.h>
16
 
17
/*PAGE
18
 *
19
 *  18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
20
 */
21
 
22
void pthread_testcancel( void )
23
{
24
  POSIX_API_Control                 *thread_support;
25
 
26
  thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
27
 
28
  if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
29
       thread_support->cancelation_requested )
30
    _POSIX_Thread_cancel_run( _Thread_Executing );
31
}

powered by: WebSVN 2.1.0

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