Fixed bug 3570135.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4723 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
gdisirio 2012-09-29 08:15:09 +00:00
parent abed47cd0d
commit 2f34399361
2 changed files with 8 additions and 8 deletions

View File

@ -26,19 +26,18 @@
#include "ch.h" #include "ch.h"
#include "ff.h" #include "ff.h"
MEMORYPOOL_DECL(fs_sem_pool, sizeof(Semaphore), chCoreAllocI);
#if _FS_REENTRANT #if _FS_REENTRANT
/*------------------------------------------------------------------------*/
/* Static array of Synchronization Objects */
/*------------------------------------------------------------------------*/
static Semaphore ff_sem[_VOLUMES];
/*------------------------------------------------------------------------*/ /*------------------------------------------------------------------------*/
/* Create a Synchronization Object */ /* Create a Synchronization Object */
/*------------------------------------------------------------------------*/ /*------------------------------------------------------------------------*/
int ff_cre_syncobj(BYTE vol, _SYNC_t *sobj) { int ff_cre_syncobj(BYTE vol, _SYNC_t *sobj) {
(void)vol; *sobj = &ff_sem[vol];
*sobj = chPoolAlloc(&fs_sem_pool);
if (*sobj == NULL)
return FALSE;
chSemInit(*sobj, 1); chSemInit(*sobj, 1);
return TRUE; return TRUE;
} }
@ -49,7 +48,6 @@ int ff_cre_syncobj(BYTE vol, _SYNC_t *sobj) {
int ff_del_syncobj(_SYNC_t sobj) { int ff_del_syncobj(_SYNC_t sobj) {
chSemReset(sobj, 0); chSemReset(sobj, 0);
chPoolFree(&fs_sem_pool, sobj);
return TRUE; return TRUE;
} }

View File

@ -83,6 +83,8 @@
***************************************************************************** *****************************************************************************
*** 2.5.1 *** *** 2.5.1 ***
- FIX: Fixed FatFS won't compile with _FS_REENTRANT enabled (bug 3570135)
(backported to 2.4.3).
- FIX: Fixed mmc_spi.c won't compile due to misplaced declaration (bug - FIX: Fixed mmc_spi.c won't compile due to misplaced declaration (bug
3570035)(backported to 2.4.3). 3570035)(backported to 2.4.3).
- FIX: Fixed problem in STM32F1xx USB driver after revision 4598 (bug 3569374). - FIX: Fixed problem in STM32F1xx USB driver after revision 4598 (bug 3569374).