]> granicus.if.org Git - spl/commitdiff
PowerPC Compatibility
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 29 Jun 2012 18:54:52 +0000 (11:54 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 2 Jul 2012 16:33:09 +0000 (09:33 -0700)
Usage of get_current() is not supported across all architectures.
The correct interface to use is the '#define current' which will
map to the appropriate function, usually current_thread_info().

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #119

include/sys/sysmacros.h
include/sys/thread.h
module/spl/spl-thread.c

index 97257e07819a610f624d5ba586c3cd74cb2480d8..04a62b19681aaef386a6c6b65916ab982bdcd06e 100644 (file)
@@ -71,7 +71,7 @@
 #define DEV_BSHIFT                     9 /* log2(DEV_BSIZE) */
 
 #define proc_pageout                   NULL
-#define curproc                                get_current()
+#define curproc                                current
 #define max_ncpus                      num_possible_cpus()
 #define CPU_SEQID                      smp_processor_id()
 #define _NOTE(x)
index c5f4234da539bc71c596aa613fb34b71dd89db6b..3a708236c1802097bd10397eaa06d0215478090d 100644 (file)
@@ -50,7 +50,7 @@ typedef void (*thread_func_t)(void *);
                        #func, arg, len, pp, state, pri)
 #define thread_exit()                  __thread_exit()
 #define thread_join(t)                 VERIFY(0)
-#define curthread                      get_current()
+#define curthread                      current
 
 extern kthread_t *__thread_create(caddr_t stk, size_t  stksize,
                                   thread_func_t func, const char *name,
index b1aa8119bfcc7a8ffb53a2cf9e76b76ede46160d..9f6e2237909662a1ae45fe848fb93584d8a34cf8 100644 (file)
@@ -60,7 +60,7 @@ thread_generic_wrapper(void *arg)
        func = tp->tp_func;
        args = tp->tp_args;
        set_current_state(tp->tp_state);
-       set_user_nice((kthread_t *)get_current(), PRIO_TO_NICE(tp->tp_pri));
+       set_user_nice((kthread_t *)current, PRIO_TO_NICE(tp->tp_pri));
        kmem_free(tp->tp_name, tp->tp_name_size);
        kmem_free(tp, sizeof(thread_priv_t));