aboutsummaryrefslogtreecommitdiffstats
path: root/os/various
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-09-29 08:15:09 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-09-29 08:15:09 +0000
commit2f343993616977cea20bccf20b5cd8fd4f04d5a9 (patch)
tree9be7bdc745fa7514f3c0df4fa0691f3396e48d01 /os/various
parentabed47cd0db3b35795ab35a6f804da282ab063b0 (diff)
downloadChibiOS-2f343993616977cea20bccf20b5cd8fd4f04d5a9.tar.gz
ChibiOS-2f343993616977cea20bccf20b5cd8fd4f04d5a9.tar.bz2
ChibiOS-2f343993616977cea20bccf20b5cd8fd4f04d5a9.zip
Fixed bug 3570135.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4723 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/various')
-rw-r--r--os/various/fatfs_bindings/fatfs_syscall.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/os/various/fatfs_bindings/fatfs_syscall.c b/os/various/fatfs_bindings/fatfs_syscall.c
index 09ebb1dd9..d048ca278 100644
--- a/os/various/fatfs_bindings/fatfs_syscall.c
+++ b/os/various/fatfs_bindings/fatfs_syscall.c
@@ -26,19 +26,18 @@
#include "ch.h"
#include "ff.h"
-MEMORYPOOL_DECL(fs_sem_pool, sizeof(Semaphore), chCoreAllocI);
-
#if _FS_REENTRANT
/*------------------------------------------------------------------------*/
+/* Static array of Synchronization Objects */
+/*------------------------------------------------------------------------*/
+static Semaphore ff_sem[_VOLUMES];
+
+/*------------------------------------------------------------------------*/
/* Create a Synchronization Object */
/*------------------------------------------------------------------------*/
int ff_cre_syncobj(BYTE vol, _SYNC_t *sobj) {
- (void)vol;
-
- *sobj = chPoolAlloc(&fs_sem_pool);
- if (*sobj == NULL)
- return FALSE;
+ *sobj = &ff_sem[vol];
chSemInit(*sobj, 1);
return TRUE;
}
@@ -49,7 +48,6 @@ int ff_cre_syncobj(BYTE vol, _SYNC_t *sobj) {
int ff_del_syncobj(_SYNC_t sobj) {
chSemReset(sobj, 0);
- chPoolFree(&fs_sem_pool, sobj);
return TRUE;
}