summaryrefslogtreecommitdiff
path: root/nuttx/sched/pthread_cancel.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-02-20 22:39:56 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-02-20 22:39:56 +0000
commit630b4bdd3d2ca967f0e1d4f438f7f1761461dd31 (patch)
treef640e5eab1ce66cdeadd0ab3684ea326f56db8a5 /nuttx/sched/pthread_cancel.c
parentbd7dce092d36128a0f84e5544ccc857a45f6ba2f (diff)
downloadpx4-nuttx-630b4bdd3d2ca967f0e1d4f438f7f1761461dd31.tar.gz
px4-nuttx-630b4bdd3d2ca967f0e1d4f438f7f1761461dd31.tar.bz2
px4-nuttx-630b4bdd3d2ca967f0e1d4f438f7f1761461dd31.zip
Eliminating GCC dependencies
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@14 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched/pthread_cancel.c')
-rw-r--r--nuttx/sched/pthread_cancel.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nuttx/sched/pthread_cancel.c b/nuttx/sched/pthread_cancel.c
index d34c29ae3..8b8c36c99 100644
--- a/nuttx/sched/pthread_cancel.c
+++ b/nuttx/sched/pthread_cancel.c
@@ -77,7 +77,7 @@ int pthread_cancel(pthread_t thread)
/* First, make sure that the handle references a valid thread */
- if (!thread.pid)
+ if (!thread)
{
/* pid == 0 is the IDLE task. Callers cannot cancel the
* IDLE task.
@@ -86,7 +86,7 @@ int pthread_cancel(pthread_t thread)
return ESRCH;
}
- tcb = sched_gettcb(thread.pid);
+ tcb = sched_gettcb((pid_t)thread);
if (!tcb)
{
/* The pid does not correspond to any known thread */
@@ -132,11 +132,11 @@ int pthread_cancel(pthread_t thread)
/* Complete pending join operations */
- (void)pthread_completejoin(thread.pid, PTHREAD_CANCELED);
+ (void)pthread_completejoin((pid_t)thread, PTHREAD_CANCELED);
/* Then let pthread_delete do the real work */
- task_delete(thread.pid);
+ task_delete((pid_t)thread);
return OK;
}