summaryrefslogtreecommitdiff
path: root/nuttx/sched/sem_holder.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-09-10 02:34:19 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-09-10 02:34:19 +0000
commit1adb6100a9921ce95d6f774af0281bca7680ff87 (patch)
treea4101caa1c8f88234caf46583b1fc8262f60033c /nuttx/sched/sem_holder.c
parent17b2b1655f4ed281bf42caa80d2eb878df408695 (diff)
downloadpx4-nuttx-1adb6100a9921ce95d6f774af0281bca7680ff87.tar.gz
px4-nuttx-1adb6100a9921ce95d6f774af0281bca7680ff87.tar.bz2
px4-nuttx-1adb6100a9921ce95d6f774af0281bca7680ff87.zip
Fix race condition when semaphore wait is interrupted by a signl
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2935 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched/sem_holder.c')
-rw-r--r--nuttx/sched/sem_holder.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nuttx/sched/sem_holder.c b/nuttx/sched/sem_holder.c
index c2e7d3447..6db6867c8 100644
--- a/nuttx/sched/sem_holder.c
+++ b/nuttx/sched/sem_holder.c
@@ -1,7 +1,7 @@
/****************************************************************************
* sched/sem_holder.c
*
- * Copyright (C) 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -818,7 +818,8 @@ void sem_restorebaseprio(FAR _TCB *stcb, FAR sem_t *sem)
* Description:
* Called from sem_post() after a thread that was waiting for a semaphore
* count was awakened because of a signal and the semaphore wait has been
- * canceled.
+ * canceled. This function restores the correct thread priority of each
+ * holder of the semaphore.
*
* Parameters:
* sem - A reference to the semaphore no longer being waited for