1
0
Fork 0
forked from len0rd/rockbox

Remove struct spinlock to cleanup some mess and simplify. It's only used in boosting for multiprocesors and a pure two-corelock heirarchy will do just fine.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19910 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2009-02-03 12:16:45 +00:00
parent e2a169bce5
commit 3cf148945e
4 changed files with 18 additions and 99 deletions

View file

@ -159,15 +159,6 @@ struct mutex
unsigned char locked; /* locked semaphore */
};
#if NUM_CORES > 1
struct spinlock
{
struct thread_entry *thread; /* lock owner */
int count; /* lock owner recursion count */
struct corelock cl; /* multiprocessor sync */
};
#endif
#ifdef HAVE_SEMAPHORE_OBJECTS
struct semaphore
{
@ -284,11 +275,6 @@ extern void mutex_unlock(struct mutex *m);
static inline void mutex_set_preempt(struct mutex *m, bool preempt)
{ m->no_preempt = !preempt; }
#endif
#if NUM_CORES > 1
extern void spinlock_init(struct spinlock *l);
extern void spinlock_lock(struct spinlock *l);
extern void spinlock_unlock(struct spinlock *l);
#endif
#ifdef HAVE_SEMAPHORE_OBJECTS
extern void semaphore_init(struct semaphore *s, int max, int start);
extern void semaphore_wait(struct semaphore *s);