Print this page
5362 invalid conversion when using asm/thread.h in c++ code

@@ -20,10 +20,11 @@
  * CDDL HEADER END
  */
 /*
  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
+ * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
  */
 
 #ifndef _ASM_THREAD_H
 #define _ASM_THREAD_H
 

@@ -46,11 +47,11 @@
  */
 
 extern __GNU_INLINE struct _kthread
 *threadp(void)
 {
-        void *__value;
+        struct _kthread *__value;
 
 #if defined(__amd64)
         __asm__ __volatile__(
             "movq %%gs:0x18,%0"         /* CPU_THREAD */
             : "=r" (__value));