Minor updates for PIC32 USB device driver bugs

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4497 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo
2012-03-19 17:56:15 +00:00
parent 199e931462
commit aa37eeaa03
8 changed files with 84 additions and 17 deletions
+11 -2
View File
@@ -1,8 +1,8 @@
/****************************************************************************
* sched/pthread_condsignal.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -112,6 +112,15 @@ int pthread_cond_signal(FAR pthread_cond_t *cond)
else
{
/* One of my objectives in this design was to make pthread_cond_signal
* usable from interrupt handlers. However, from interrupt handlers,
* you cannot take the associated mutex before signaling the condition.
* As a result, I think that there could be a race condition with
* the following logic which assumes that the if sval < 0 then the
* thread is waiting. Without the mutex, there is no atomic, protected
* operation that will guarantee this to be so.
*/
sdbg("sval=%d\n", sval);
if (sval < 0)
{
+2 -2
View File
@@ -1,8 +1,8 @@
/****************************************************************************
* sched/pthread_condwait.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions