Subversion Repositories freemyipod

Rev

Rev 71 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 71 Rev 85
Line 24... Line 24...
24
#include "global.h"
24
#include "global.h"
25
#include "thread.h"
25
#include "thread.h"
26
#include "timer.h"
26
#include "timer.h"
27
#include "panic.h"
27
#include "panic.h"
28
#include "util.h"
28
#include "util.h"
-
 
29
#ifdef HAVE_STORAGE
29
#include "dir.h"
30
#include "dir.h"
30
#include "file.h"
31
#include "file.h"
-
 
32
#endif
31
 
33
 
32
 
34
 
33
struct scheduler_thread scheduler_threads[MAX_THREADS] IBSS_ATTR;
35
struct scheduler_thread scheduler_threads[MAX_THREADS] IBSS_ATTR;
34
struct scheduler_thread* current_thread IBSS_ATTR;
36
struct scheduler_thread* current_thread IBSS_ATTR;
35
uint32_t last_tick IBSS_ATTR;
37
uint32_t last_tick IBSS_ATTR;
Line 430... Line 432...
430
                mutex_remove_from_queue((struct mutex*)t->blocked_by, t);
432
                mutex_remove_from_queue((struct mutex*)t->blocked_by, t);
431
            else if (t->block_type == THREAD_BLOCK_WAKEUP)
433
            else if (t->block_type == THREAD_BLOCK_WAKEUP)
432
                ((struct wakeup*)t->blocked_by)->waiter = NULL;
434
                ((struct wakeup*)t->blocked_by)->waiter = NULL;
433
        }
435
        }
434
        t->state = THREAD_FREE;
436
        t->state = THREAD_FREE;
-
 
437
#ifdef HAVE_STORAGE
435
        close_all_of_process(t);
438
        close_all_of_process(t);
436
        closedir_all_of_process(t);
439
        closedir_all_of_process(t);
-
 
440
#endif
437
    }
441
    }
438
 
442
 
439
    leave_critical_section(mode);
443
    leave_critical_section(mode);
440
 
444
 
441
    if (needsswitch) context_switch();
445
    if (needsswitch) context_switch();