summaryrefslogtreecommitdiff
path: root/libobjc/thr.c
diff options
context:
space:
mode:
authorNicola Pero <nicola.pero@meta-innovation.com>2010-09-12 00:43:15 +0000
committerNicola Pero <nicola@gcc.gnu.org>2010-09-12 00:43:15 +0000
commit7b8699866416f7a55116e19bf6fe2c28bae12a68 (patch)
treee22bed6f4601015a5042c0e66fd318e63707468e /libobjc/thr.c
parent201fb1f2283994930d4bc07f9eaeaaf7d98052c0 (diff)
downloadgcc-7b8699866416f7a55116e19bf6fe2c28bae12a68.tar.gz
In libobjc/:
* objc/deprecated/objc_error.h: New file. * objc/objc-api.h: Include deprecated/objc_error.h instead of defining objc_error and related. * error.c: New file. Added _objc_abort function which replaces objc_error. No change in functionality as they both print an error and abort. * misc.c: File removed. Code moved into memory.c and error.c. * memory.c: New file. * objc-private/error.h: New file. * archive.c: Include objc-private/error.h and use _objc_abort instead of objc_error everywhere. * class.c: Same change. * encoding.c: Same change. * init.c: Same change, and simplified init_check_module_version. * memory.c: Same change. * sendmsg.c: Same change. * thr.c: Same change. * Makefile.in (OBJ_DEPRECATED_H): Added objc_error.h. (OBJ_H): Reordered list. (OBJS): Removed misc.lo, added memory.lo and error.lo. (OBJS_GC): Removed misc_gc.lo, added memory_gc.lo and error_gc.lo. (misc_gc.lo): Rule removed. (error_gc.lo): Rule added. (memory_gc.lo): Rule added. From-SVN: r164223
Diffstat (limited to 'libobjc/thr.c')
-rw-r--r--libobjc/thr.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/libobjc/thr.c b/libobjc/thr.c
index 0a5853608d6..50196e81c58 100644
--- a/libobjc/thr.c
+++ b/libobjc/thr.c
@@ -23,6 +23,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
#include "objc-private/common.h"
+#include "objc-private/error.h"
#define _LIBOBJC
/* The line below is needed for declarations of functions such as
pthread_mutexattr_settype, without which gthr-posix.h may fail to
@@ -129,12 +130,16 @@ __objc_thread_detach_function (struct __objc_thread_start_state *istate)
if ((imp = (id (*) (id, SEL, id))objc_msg_lookup (object, selector)))
(*imp) (object, selector, argument);
else
- objc_error (object, OBJC_ERR_UNIMPLEMENTED,
- "objc_thread_detach called with bad selector.\n");
+ {
+ /* FIXME: Should we abort here ? */
+ _objc_abort ("objc_thread_detach called with bad selector.\n");
+ }
}
else
- objc_error (nil, OBJC_ERR_BAD_STATE,
- "objc_thread_detach called with NULL state.\n");
+ {
+ /* FIXME: Should we abort here ? */
+ _objc_abort ("objc_thread_detach called with NULL state.\n");
+ }
/* Exit the thread */
objc_thread_exit ();