Branch: Tag:

2004-03-08

2004-03-08 15:02:43 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Backported improved diagnostics from Pike 7.5.

Rev: src/threads.c:1.174
Rev: src/threads.h:1.121

1:   /* -  * $Id: threads.h,v 1.120 2003/12/13 20:37:53 jonasw Exp $ +  * $Id: threads.h,v 1.121 2004/03/08 15:02:43 grubba Exp $    */   #ifndef THREADS_H   #define THREADS_H
85:   struct object;   PMOD_EXPORT extern size_t thread_stack_size;    - PMOD_EXPORT void thread_low_error (int errcode); + PMOD_EXPORT void thread_low_error (int errcode, const char *cmd, +  const char *fname, int lineno);      #define LOW_THREAD_CHECK_NONZERO_ERROR(CALL) do { \    int thread_errcode_ = (CALL); \ -  if (thread_errcode_) thread_low_error (thread_errcode_); \ +  if (thread_errcode_) \ +  thread_low_error(thread_errcode_, TOSTR(CALL), \ +  __FILE__, __LINE__); \    } while (0)      #define DEFINE_MUTEX(X) PIKE_MUTEX_T X