Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mv include/xbt/context.h src/include/xbt/context.h since users shouldn't mess with it
[simgrid.git] / src / xbt / context.c
index 6e367a0..5695fec 100644 (file)
@@ -3,7 +3,7 @@
 /* a fast and simple context switching library                              */
 
 /* Copyright (c) 2004 Arnaud Legrand.                                       */
-/* Copyright (c) 2004 Martin Quinson.                                       */
+/* Copyright (c) 2004, 2005 Martin Quinson.                                 */
 /* All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 #include "xbt/dynar.h"
 #include "gras_config.h"
 
- /** \defgroup XBT_context User-level context library
-  *  \brief This section describes how to use high-level functions 
-  *  (as opposed to <tt>setjump/longjmp</tt>) to schedule non-preemptible 
-  *  threads.
-  */
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(context, xbt, "Context");
 
 /* #define WARNING(format, ...) (fprintf(stderr, "[%s , %s : %d] ", __FILE__, __FUNCTION__, __LINE__),\ */
@@ -45,9 +39,11 @@ static void __xbt_context_yield(xbt_context_t context)
 
   xbt_assert0(current_context,"You have to call context_init() first.");
   
-/*   WARNING("--------- current_context (%p) is yielding to context(%p) ---------",current_context,context); */
-/*   VOIRP(current_context); */
-/*   if(current_context) VOIRP(current_context->save); */
+  DEBUG2("--------- current_context (%p) is yielding to context(%p) ---------",
+        current_context,context);
+
+  if(current_context)
+    DEBUG1("current_context->save = %p",current_context->save);
 /*   VOIRP(context); */
 /*   if(context) VOIRP(context->save); */