Browse Source

Replace _LIBC_REENTRANT with __UCLIBC_HAS_THREADS__
-Erik

Eric Andersen 21 năm trước cách đây
mục cha
commit
6a95b43a5e
2 tập tin đã thay đổi với 7 bổ sung5 xóa
  1. 4 2
      libc/misc/internals/__uClibc_main.c
  2. 3 3
      libc/sysdeps/linux/cris/sysdep.S

+ 4 - 2
libc/misc/internals/__uClibc_main.c

@@ -21,7 +21,6 @@
  */
 extern int  main(int argc, char **argv, char **envp);
 extern void weak_function _init(void);
-extern void weak_function __pthread_initialize_minimal(void);
 extern void weak_function _fini(void);
 extern void weak_function _stdio_init(void);
 extern int *weak_const_function __errno_location(void);
@@ -30,6 +29,9 @@ extern int weak_function atexit(void (*function)(void));
 #ifdef __UCLIBC_HAS_LOCALE__
 extern void weak_function _locale_init(void);
 #endif
+#ifdef __UCLIBC_HAS_THREADS__
+extern void weak_function __pthread_initialize_minimal(void);
+#endif
 
 
 
@@ -57,7 +59,7 @@ __uClibc_main(int argc, char **argv, char **envp)
 		__environ = envp;
 	}
 
-#ifdef _LIBC_REENTRANT
+#ifdef __UCLIBC_HAS_THREADS__
 	if (likely(__pthread_initialize_minimal!=NULL))
 	    __pthread_initialize_minimal();
 #endif

+ 3 - 3
libc/sysdeps/linux/cris/sysdep.S

@@ -37,7 +37,7 @@
 ENTRY (__syscall_error)
 	neg.d	r10,r10
 
-#ifdef	_LIBC_REENTRANT
+#ifdef	__UCLIBC_HAS_THREADS__
 	push	r10
 	push	srp
 
@@ -50,14 +50,14 @@ ENTRY (__syscall_error)
 	pop	r11
 	move.d	r11,[r10]
 
-#else /* not _LIBC_REENTRANT */
+#else /* not __UCLIBC_HAS_THREADS__ */
 # ifdef __PIC__
 	move.d	[r0+C_SYMBOL_NAME(errno:GOT)],r9
 	move.d  r10,[r9]
 # else
 	move.d	r10,[C_SYMBOL_NAME(errno)]
 # endif
-#endif /* _LIBC_REENTRANT */
+#endif /* __UCLIBC_HAS_THREADS__ */
 
 #ifdef __PIC__
 /* PIC callers are supposed to have R0 on stack, ready for us to restore.