-
-/**
- * \brief Returns the current context of this thread.
- * \return the current context of this thread
- */
-smx_context_t SIMIX_context_get_current(void)
-{
- if (SIMIX_context_is_parallel()) {
-#if HAVE_THREAD_LOCAL_STORAGE
- return smx_current_context_parallel;
-#else
- return xbt_os_thread_get_specific(smx_current_context_key);
-#endif
- }
- else {
- return smx_current_context_serial;
- }
-}
-
-/**
- * \brief Sets the current context of this thread.
- * \param context the context to set
- */
-void SIMIX_context_set_current(smx_context_t context)
-{
- if (SIMIX_context_is_parallel()) {
-#if HAVE_THREAD_LOCAL_STORAGE
- smx_current_context_parallel = context;
-#else
- xbt_os_thread_set_specific(smx_current_context_key, context);
-#endif
- }
- else {
- smx_current_context_serial = context;
- }
-}