/* $Id$ */
-/* rl_gras.c -- empty body of functions used in SG, but harmful in RL */
+/* xbt_os_thread_stub -- empty functions used in SG, but harmful in RL */
+/* More specifically, it is loaded by xbt/context.c when CONTEXT_UCONTEXT */
+/* When CONTEXT_THREAD, xbt_os_thread is loaded instead (to get real func) */
+/* In RL, xbt_os_thread is part of GRAS_RL_SRC */
/* Copyright (c) 2007 Martin Quinson. */
/* All rights reserved. */
#include "xbt_modinter.h"
#include "xbt/sysdep.h"
-#include "xbt/xbt_thread.h"
+#include "xbt/xbt_os_thread.h"
#include "portable.h" /* CONTEXT_THREADS */
#ifndef CONTEXT_THREADS
*/
/* Mod_init/exit mecanism */
-void xbt_thread_mod_init(void) {}
+void xbt_os_thread_mod_init(void) {}
-void xbt_thread_mod_exit(void) {}
+void xbt_os_thread_mod_exit(void) {}
/* Main functions */
-xbt_thread_t xbt_thread_create(pvoid_f_pvoid_t start_routine,void* param) {
+xbt_os_thread_t xbt_os_thread_create(pvoid_f_pvoid_t start_routine,void* param) {
xbt_backtrace_display();
- xbt_die("No pthread in SG when compiled against the ucontext (xbt_thread_create)");
+ xbt_die("No pthread in SG when compiled against the ucontext (xbt_os_thread_create)");
}
-void xbt_thread_exit(int *retcode){
+void xbt_os_thread_exit(int *retcode){
xbt_backtrace_display();
- xbt_die("No pthread in SG when compiled against the ucontext (xbt_thread_exit)");
+ xbt_die("No pthread in SG when compiled against the ucontext (xbt_os_thread_exit)");
}
-xbt_thread_t xbt_thread_self(void){
+xbt_os_thread_t xbt_os_thread_self(void){
xbt_backtrace_display();
- xbt_die("No pthread in SG when compiled against the ucontext (xbt_thread_self)");
+ xbt_die("No pthread in SG when compiled against the ucontext (xbt_os_thread_self)");
}
-void xbt_thread_yield(void){
+void xbt_os_thread_os_yield(void){
xbt_backtrace_display();
- xbt_die("No pthread in SG when compiled against the ucontext (xbt_thread_yield)");
+ xbt_die("No pthread in SG when compiled against the ucontext (xbt_os_thread_yield)");
}
-xbt_mutex_t xbt_mutex_init(void){
+xbt_os_mutex_t xbt_os_mutex_init(void){
xbt_backtrace_display();
- xbt_die("No pthread in SG when compiled against the ucontext (xbt_mutex_init)");
+ xbt_die("No pthread in SG when compiled against the ucontext (xbt_os_mutex_init)");
}
-void xbt_mutex_lock(xbt_mutex_t mutex){
+void xbt_os_mutex_lock(xbt_os_mutex_t mutex){
xbt_backtrace_display();
- xbt_die("No pthread in SG when compiled against the ucontext (xbt_mutex_lock)");
+ xbt_die("No pthread in SG when compiled against the ucontext (xbt_os_mutex_lock)");
}
-void xbt_mutex_unlock(xbt_mutex_t mutex){
+void xbt_os_mutex_unlock(xbt_os_mutex_t mutex){
xbt_backtrace_display();
- xbt_die("No pthread in SG when compiled against the ucontext (xbt_mutex_unlock)");
+ xbt_die("No pthread in SG when compiled against the ucontext (xbt_os_mutex_unlock)");
}
-void xbt_mutex_destroy(xbt_mutex_t mutex){
+void xbt_os_mutex_destroy(xbt_os_mutex_t mutex){
xbt_backtrace_display();
- xbt_die("No pthread in SG when compiled against the ucontext (xbt_mutex_destroy)");
+ xbt_die("No pthread in SG when compiled against the ucontext (xbt_os_mutex_destroy)");
}
-xbt_thcond_t xbt_thcond_init(void){
+xbt_os_cond_t xbt_os_cond_init(void){
xbt_backtrace_display();
- xbt_die("No pthread in SG when compiled against the ucontext (xbt_thcond_init)");
+ xbt_die("No pthread in SG when compiled against the ucontext (xbt_os_cond_init)");
}
-void xbt_thcond_wait(xbt_thcond_t cond, xbt_mutex_t mutex){
+void xbt_os_cond_wait(xbt_os_cond_t cond, xbt_os_mutex_t mutex){
xbt_backtrace_display();
- xbt_die("No pthread in SG when compiled against the ucontext (xbt_thcond_wait)");
+ xbt_die("No pthread in SG when compiled against the ucontext (xbt_os_cond_wait)");
}
-void xbt_thcond_signal(xbt_thcond_t cond){
+void xbt_os_cond_signal(xbt_os_cond_t cond){
xbt_backtrace_display();
- xbt_die("No pthread in SG when compiled against the ucontext (xbt_thcond_signal)");
+ xbt_die("No pthread in SG when compiled against the ucontext (xbt_os_cond_signal)");
}
-void xbt_thcond_broadcast(xbt_thcond_t cond){
+void xbt_os_cond_broadcast(xbt_os_cond_t cond){
xbt_backtrace_display();
- xbt_die("No pthread in SG when compiled against the ucontext (xbt_thcond_broadcast)");
+ xbt_die("No pthread in SG when compiled against the ucontext (xbt_os_cond_broadcast)");
}
-void xbt_thcond_destroy(xbt_thcond_t cond){
+void xbt_os_cond_destroy(xbt_os_cond_t cond){
xbt_backtrace_display();
- xbt_die("No pthread in SG when compiled against the ucontext (xbt_thcond_destroy)");
+ xbt_die("No pthread in SG when compiled against the ucontext (xbt_os_cond_destroy)");
}