#else
__xbt_context_yield(current_context);
#endif
- xbt_assert0(0, "You can't be here!");
+ THROW_IMPOSSIBLE();
}
static void __xbt_context_yield(xbt_context_t context)
{
- xbt_assert0(current_context, "You have to call context_init() first.");
+#ifdef CONTEXT_THREADS
+ xbt_context_t self;
+#endif
+xbt_assert0(current_context, "You have to call context_init() first.");
xbt_assert0(context,"Invalid argument");
if (current_context == context) {
}
#ifdef CONTEXT_THREADS
- xbt_context_t self = current_context;
+ self = current_context;
DEBUG2("[%p] **** Locking ctx %p ****", self, context);
xbt_os_mutex_lock(context->mutex);
DEBUG1("[%p] **** Updating current_context ****", self);
int return_value = 0;
if (context->save == NULL) {
- xbt_assert(context == current_context);
DEBUG1("[%p] **** Yielding to somebody else ****", current_context);
DEBUG2("Saving current_context value (%p) to context(%p)->save",
current_context, context);
/* Java cruft I'm gonna kill in the next cleanup round */
void xbt_context_set_jprocess(xbt_context_t context, void *jp){}
void* xbt_context_get_jprocess(xbt_context_t context){return NULL;}
-void xbt_context_set_jmutex(xbt_context_t context,void *jm){}
-void* xbt_context_get_jmutex(xbt_context_t context){return NULL;}
-void xbt_context_set_jcond(xbt_context_t context,void *jc){}
-void* xbt_context_get_jcond(xbt_context_t context){return NULL;}
void xbt_context_set_jenv(xbt_context_t context,void* je){}
void* xbt_context_get_jenv(xbt_context_t context){return NULL;}