summaryrefslogtreecommitdiff
path: root/nuttx/sched/pthread_condtimedwait.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-02-21 21:55:16 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-02-21 21:55:16 +0000
commitefc2cf23a849f7be1d65c4cdd7767f88917c46a7 (patch)
treefbe3518a364d6b9d811e00f7201e082d50ead7e3 /nuttx/sched/pthread_condtimedwait.c
parent94e5b72f50f3096b83fe50c7b57324a08e318f29 (diff)
downloadpx4-nuttx-efc2cf23a849f7be1d65c4cdd7767f88917c46a7.tar.gz
px4-nuttx-efc2cf23a849f7be1d65c4cdd7767f88917c46a7.tar.bz2
px4-nuttx-efc2cf23a849f7be1d65c4cdd7767f88917c46a7.zip
Progress toward clean SDCC compilation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@18 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched/pthread_condtimedwait.c')
-rw-r--r--nuttx/sched/pthread_condtimedwait.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/nuttx/sched/pthread_condtimedwait.c b/nuttx/sched/pthread_condtimedwait.c
index 59d92921e..9ebaf6917 100644
--- a/nuttx/sched/pthread_condtimedwait.c
+++ b/nuttx/sched/pthread_condtimedwait.c
@@ -71,14 +71,18 @@
* Private Functions
************************************************************/
-static void pthread_condtimedout(int pid, int signo, int arg3, int arg4)
+static void pthread_condtimedout(int argc, uint32 pid, uint32 signo, ...)
{
+#ifdef CONFIG_CAN_PASS_STRUCTS
union sigval value;
/* Send the specified signal to the specified task. */
- value.sival_ptr = 0;
- (void)sigqueue(pid, signo, value);
+ value.sival_ptr = NULL;
+ (void)sigqueue((int)pid, (int)signo, value);
+#else
+ (void)sigqueue((int)pid, (int)signo, NULL);
+#endif
}
/************************************************************
@@ -112,8 +116,8 @@ int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
sint32 relusec;
sint32 ticks;
int mypid = (int)getpid();
+ irqstate_t int_state;
int ret = OK;
- int int_state;
int status;
dbg("cond=0x%p mutex=0x%p abstime=0x%p\n", cond, mutex, abstime);
@@ -240,7 +244,7 @@ int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
/* Start the watchdog */
wd_start(wdog, ticks, (wdentry_t)pthread_condtimedout,
- mypid, ECHO_COND_WAIT_SIGNO, 0, 0);
+ 2, (uint32)mypid, (uint32)ECHO_COND_WAIT_SIGNO);
/* Take the condition semaphore. Do not restore interrupts
* until we return from the wait. This is necessary to