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_die("No pthread in SG when compiled against the ucontext");
34 void xbt_thread_exit(int *retcode){
35 xbt_die("No pthread in SG when compiled against the ucontext");
38 xbt_thread_t xbt_thread_self(void){
39 xbt_die("No pthread in SG when compiled against the ucontext");
42 void xbt_thread_yield(void){
43 xbt_die("No pthread in SG when compiled against the ucontext");
47 xbt_mutex_t xbt_mutex_init(void){
48 xbt_die("No pthread in SG when compiled against the ucontext");
51 void xbt_mutex_lock(xbt_mutex_t mutex){
52 xbt_die("No pthread in SG when compiled against the ucontext");
55 void xbt_mutex_unlock(xbt_mutex_t mutex){
56 xbt_die("No pthread in SG when compiled against the ucontext");
59 void xbt_mutex_destroy(xbt_mutex_t mutex){
60 xbt_die("No pthread in SG when compiled against the ucontext");
63 xbt_thcond_t xbt_thcond_init(void){
64 xbt_die("No pthread in SG when compiled against the ucontext");
67 void xbt_thcond_wait(xbt_thcond_t cond, xbt_mutex_t mutex){
68 xbt_die("No pthread in SG when compiled against the ucontext");
71 void xbt_thcond_signal(xbt_thcond_t cond){
72 xbt_die("No pthread in SG when compiled against the ucontext");
75 void xbt_thcond_broadcast(xbt_thcond_t cond){
76 xbt_die("No pthread in SG when compiled against the ucontext");
79 void xbt_thcond_destroy(xbt_thcond_t cond){
80 xbt_die("No pthread in SG when compiled against the ucontext");