Revision: 812
http://cadcdev.svn.sourceforge.net/cadcdev/?rev=812&view=rev
Author: ljsebald
Date: 2012-06-10 15:46:05 +0000 (Sun, 10 Jun 2012)
Log Message:
-----------
Check the timeout value in mutex_lock_timed(), as the documentation implies we do.
Modified Paths:
--------------
kos/kernel/thread/mutex.c
Modified: kos/kernel/thread/mutex.c
===================================================================
--- kos/kernel/thread/mutex.c 2012-06-10 15:44:49 UTC (rev 811)
+++ kos/kernel/thread/mutex.c 2012-06-10 15:46:05 UTC (rev 812)
@@ -91,6 +91,11 @@
return -1;
}
+ if(timeout < 0) {
+ errno = EINVAL;
+ return -1;
+ }
+
old = irq_disable();
if(m->type < MUTEX_TYPE_NORMAL || m->type > MUTEX_TYPE_RECURSIVE) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|