summaryrefslogtreecommitdiff
path: root/firmware/storage.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2011-03-05 17:48:06 +0000
committerThomas Martitz <kugel@rockbox.org>2011-03-05 17:48:06 +0000
commitcc889e9d608e6b07b78541849b7e63b6fb3f6058 (patch)
treeea01a47602b68561d294f705e8ab7669fb00ae9a /firmware/storage.c
parent0b0f99b18ebe6305c9cab12bf8b36d154fc9c87f (diff)
downloadrockbox-cc889e9d608e6b07b78541849b7e63b6fb3f6058.tar.gz
rockbox-cc889e9d608e6b07b78541849b7e63b6fb3f6058.zip
Change the thread api a bit.
* Remove THREAD_ID_CURRENT macro in favor of a thread_self() function, this allows thread functions to be simpler. * thread_self_entry() shortcut for kernel.c. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29521 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/storage.c')
-rw-r--r--firmware/storage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/storage.c b/firmware/storage.c
index 867c68cf6b..69f28d94a8 100644
--- a/firmware/storage.c
+++ b/firmware/storage.c
@@ -71,14 +71,14 @@ static void storage_wait_turn(IF_MD_NONVOID(int drive))
71#ifndef HAVE_MULTIDRIVE 71#ifndef HAVE_MULTIDRIVE
72 int drive=0; 72 int drive=0;
73#endif 73#endif
74 int my_prio = thread_get_io_priority(THREAD_ID_CURRENT); 74 int my_prio = thread_get_io_priority(thread_self());
75 int loops=my_prio; 75 int loops=my_prio;
76 while(storage_should_wait(drive, my_prio) && (loops--)>=0) 76 while(storage_should_wait(drive, my_prio) && (loops--)>=0)
77 { 77 {
78 sleep(STORAGE_DELAY_UNIT); 78 sleep(STORAGE_DELAY_UNIT);
79 } 79 }
80 80
81 storage_last_thread[drive] = thread_get_current(); 81 storage_last_thread[drive] = thread_self();
82 storage_last_activity[drive] = current_tick; 82 storage_last_activity[drive] = current_tick;
83} 83}
84#endif 84#endif