From 12375d1d3aa41f7d277a9af584c7b810b636ec95 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Wed, 2 Mar 2011 08:49:38 +0000 Subject: Merge functionality of wakeups and semaphores-- fewer APIs and object types. semaphore_wait takes a timeout now so codecs and plugins have to be made incompatible. Don't make semaphores for targets not using them. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29492 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/s5l8700/ipodnano2g/nand-nano2g.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'firmware/target/arm/s5l8700/ipodnano2g') diff --git a/firmware/target/arm/s5l8700/ipodnano2g/nand-nano2g.c b/firmware/target/arm/s5l8700/ipodnano2g/nand-nano2g.c index 8a4541a226..9261e5b3a0 100644 --- a/firmware/target/arm/s5l8700/ipodnano2g/nand-nano2g.c +++ b/firmware/target/arm/s5l8700/ipodnano2g/nand-nano2g.c @@ -94,9 +94,9 @@ static long nand_last_activity_value = -1; static long nand_stack[DEFAULT_STACK_SIZE]; static struct mutex nand_mtx; -static struct wakeup nand_wakeup; +static struct semaphore nand_complete; static struct mutex ecc_mtx; -static struct wakeup ecc_wakeup; +static struct semaphore ecc_complete; static uint8_t nand_data[0x800] STORAGE_ALIGN_ATTR; static uint8_t nand_ctrl[0x200] STORAGE_ALIGN_ATTR; @@ -731,9 +731,9 @@ static void nand_thread(void) int nand_device_init(void) { mutex_init(&nand_mtx); - wakeup_init(&nand_wakeup); + semaphore_init(&nand_complete, 1, 0); mutex_init(&ecc_mtx); - wakeup_init(&ecc_wakeup); + semaphore_init(&ecc_complete, 1, 0); uint32_t type; uint32_t i, j; -- cgit v1.2.3