- DEBUG0("**** Locking ****");
- xbt_mutex_lock(context->mutex);
- DEBUG0("**** Updating current_context ****");
- current_context = context;
- DEBUG0("**** Releasing the prisonner ****");
- xbt_thcond_signal(context->cond);
- DEBUG0("**** Unlocking ****");
- xbt_mutex_unlock(context->mutex);
- DEBUG0("**** Exiting ****");
- xbt_thread_exit(0);
+ DEBUG2("[%p] **** Locking %p ****", context, context->mutex);
+ xbt_os_mutex_lock(context->mutex);
+/* DEBUG1("[%p] **** Updating current_context ****"); */
+/* current_context = context; */
+ DEBUG1("[%p] **** Releasing the prisonner ****", context);
+ xbt_os_cond_signal(context->cond);
+ DEBUG2("[%p] **** Unlocking individual %p ****", context, context->mutex);
+ xbt_os_mutex_unlock(context->mutex);
+ DEBUG1("[%p] **** Exiting ****", context);
+ xbt_os_thread_exit(NULL); // We should provide return value in case other wants it