3 /* rl_gras.c -- empty body of functions used in SG, but harmful in RL */
5 /* Copyright (c) 2007 Martin Quinson. */
6 /* All rights reserved. */
8 /* This program is free software; you can redistribute it and/or modify it
9 * under the terms of the license (GNU LGPL) which comes with this package. */
11 #include "xbt_modinter.h"
12 #include "xbt/sysdep.h"
13 #include "xbt/xbt_thread.h"
14 #include "portable.h" /* CONTEXT_THREADS */
16 #ifndef CONTEXT_THREADS
18 /* xbt_threads is loaded in libsimgrid when they are used to implement the xbt_context.
19 * The decision (and the loading) is made in xbt/context.c.
22 /* Mod_init/exit mecanism */
23 void xbt_thread_mod_init(void) {}
25 void xbt_thread_mod_exit(void) {}
30 xbt_thread_t xbt_thread_create(pvoid_f_pvoid_t start_routine,void* param) {
31 xbt_backtrace_display();
32 xbt_die("No pthread in SG when compiled against the ucontext (xbt_thread_create)");
35 void xbt_thread_exit(int *retcode){
36 xbt_backtrace_display();
37 xbt_die("No pthread in SG when compiled against the ucontext (xbt_thread_exit)");
40 xbt_thread_t xbt_thread_self(void){
41 xbt_backtrace_display();
42 xbt_die("No pthread in SG when compiled against the ucontext (xbt_thread_self)");
45 void xbt_thread_yield(void){
46 xbt_backtrace_display();
47 xbt_die("No pthread in SG when compiled against the ucontext (xbt_thread_yield)");
51 xbt_mutex_t xbt_mutex_init(void){
52 xbt_backtrace_display();
53 xbt_die("No pthread in SG when compiled against the ucontext (xbt_mutex_init)");
56 void xbt_mutex_lock(xbt_mutex_t mutex){
57 xbt_backtrace_display();
58 xbt_die("No pthread in SG when compiled against the ucontext (xbt_mutex_lock)");
61 void xbt_mutex_unlock(xbt_mutex_t mutex){
62 xbt_backtrace_display();
63 xbt_die("No pthread in SG when compiled against the ucontext (xbt_mutex_unlock)");
66 void xbt_mutex_destroy(xbt_mutex_t mutex){
67 xbt_backtrace_display();
68 xbt_die("No pthread in SG when compiled against the ucontext (xbt_mutex_destroy)");
71 xbt_thcond_t xbt_thcond_init(void){
72 xbt_backtrace_display();
73 xbt_die("No pthread in SG when compiled against the ucontext (xbt_thcond_init)");
76 void xbt_thcond_wait(xbt_thcond_t cond, xbt_mutex_t mutex){
77 xbt_backtrace_display();
78 xbt_die("No pthread in SG when compiled against the ucontext (xbt_thcond_wait)");
81 void xbt_thcond_signal(xbt_thcond_t cond){
82 xbt_backtrace_display();
83 xbt_die("No pthread in SG when compiled against the ucontext (xbt_thcond_signal)");
86 void xbt_thcond_broadcast(xbt_thcond_t cond){
87 xbt_backtrace_display();
88 xbt_die("No pthread in SG when compiled against the ucontext (xbt_thcond_broadcast)");
91 void xbt_thcond_destroy(xbt_thcond_t cond){
92 xbt_backtrace_display();
93 xbt_die("No pthread in SG when compiled against the ucontext (xbt_thcond_destroy)");