diff options
author | Haru <haru@dotalux.com> | 2016-03-13 15:48:14 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-07-12 20:58:42 +0200 |
commit | b9578c1d8ce54b48363e297b1c56cdea0ed72821 (patch) | |
tree | 4539010ef6af70a55b2b1515a464ebe3cfe60fcd /src/test | |
parent | 8c66f639fdd495f3d28aac905acda823fc6a0ae6 (diff) | |
download | hercules-b9578c1d8ce54b48363e297b1c56cdea0ed72821.tar.gz hercules-b9578c1d8ce54b48363e297b1c56cdea0ed72821.tar.bz2 hercules-b9578c1d8ce54b48363e297b1c56cdea0ed72821.tar.xz hercules-b9578c1d8ce54b48363e297b1c56cdea0ed72821.zip |
Removed unnecessary typedefs from thread and spinlock
- SPIN_LOCK -> struct spin_lock
- rAthread -> struct thread_handle
- rAthreadProc -> threadFunc
- RATHREAD_PRIO -> enum thread_priority
- RAT_PRIO_LOW -> THREADPRIO_LOW
- RAT_PRIO_NORMAL -> THREADPRIO_NORMAL
- RAT_PRIO_HIGH -> THREADPRIO_HIGH
- RA_THREADS_MAX -> THREADS_MAX
Signed-off-by: Haru <haru@dotalux.com>
fixupthread
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_spinlock.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/test/test_spinlock.c b/src/test/test_spinlock.c index cb46b239c..5ea3ee94d 100644 --- a/src/test/test_spinlock.c +++ b/src/test/test_spinlock.c @@ -38,7 +38,7 @@ #define PERINC 100000 #define LOOPS 47 -static SPIN_LOCK lock; +static struct spin_lock lock; static unsigned int val = 0; static volatile int32 done_threads = 0; @@ -60,8 +60,9 @@ static void *worker(void *p){ return NULL; }//end: worker() -int do_init(int argc, char **argv){ - rAthread *t[THRC]; +int do_init(int argc, char **argv) +{ + struct thread_handle *t[THRC]; int j, i; int ok; @@ -78,7 +79,7 @@ int do_init(int argc, char **argv){ InitializeSpinLock(&lock); for(i =0; i < THRC; i++){ - t[i] = thread->createEx(worker, NULL, 1024*512, RAT_PRIO_NORMAL); + t[i] = thread->createEx(worker, NULL, 1024*512, THREADPRIO_NORMAL); } while(1){ |