summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/canceleval.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-13 10:28:14 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-20 07:49:39 +0200
commitda82656065d09f7b6aa411ba361287afdd787204 (patch)
tree3a17cae7059c89d111642cb27a1cf55ded61f604 /cpukit/posix/src/canceleval.c
parentscore: Avoid Giant lock for _Thread_Start() (diff)
downloadrtems-da82656065d09f7b6aa411ba361287afdd787204.tar.bz2
posix: Rework thread cancellation
Add Thread_Life_state::THREAD_LIFE_CHANGE_DEFERRED and rework the POSIX thread cancellation to use the thread life states. Update #2555. Update #2626.
Diffstat (limited to 'cpukit/posix/src/canceleval.c')
-rw-r--r--cpukit/posix/src/canceleval.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/cpukit/posix/src/canceleval.c b/cpukit/posix/src/canceleval.c
deleted file mode 100644
index 9e02c92375..0000000000
--- a/cpukit/posix/src/canceleval.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * @file
- *
- * @brief POSIX Function Evaluates Thread Cancellation and Enables Dispatch
- * @ingroup POSIXAPI
- */
-
-/*
- * COPYRIGHT (c) 1989-2009.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <pthread.h>
-#include <rtems/system.h>
-#include <rtems/score/thread.h>
-#include <rtems/posix/cancel.h>
-#include <rtems/posix/pthreadimpl.h>
-
-void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
- Thread_Control *the_thread
-)
-{
- POSIX_API_Control *thread_support;
-
- thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
-
- if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
- thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
- thread_support->cancelation_requested ) {
- /* FIXME: This path is broken on SMP */
- _Thread_Unnest_dispatch();
- /* FIXME: Cancelability state may change here */
- _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
- } else
- _Objects_Put( &the_thread->Object );
-
-}