Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
proper file name for the stubs not used in either SG or RL
[simgrid.git] / src / gras / sg_stubs.c
1 /* $Id$ */
2
3 /* rl_gras.c -- empty body of functions used in SG, but harmful in RL       */
4
5 /* Copyright (c) 2007 Martin Quinson.                                       */
6 /* All rights reserved.                                                     */
7
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. */
10
11 #include "xbt_modinter.h"
12 #include "xbt/sysdep.h"
13 #include "xbt/xbt_thread.h"
14 #include "portable.h" /* CONTEXT_THREADS */
15
16 #ifndef CONTEXT_THREADS
17
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.
20  */
21
22 /* Mod_init/exit mecanism */
23 void xbt_thread_mod_init(void) {}
24    
25 void xbt_thread_mod_exit(void) {}
26
27
28 /* Main functions */
29
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");
32 }
33
34 void xbt_thread_exit(int *retcode){
35    xbt_die("No pthread in SG when compiled against the ucontext");
36 }
37
38 xbt_thread_t xbt_thread_self(void){
39    xbt_die("No pthread in SG when compiled against the ucontext");
40 }
41
42 void xbt_thread_yield(void){
43    xbt_die("No pthread in SG when compiled against the ucontext");
44 }
45
46
47 xbt_mutex_t xbt_mutex_init(void){
48    xbt_die("No pthread in SG when compiled against the ucontext");
49 }
50
51 void xbt_mutex_lock(xbt_mutex_t mutex){
52    xbt_die("No pthread in SG when compiled against the ucontext");
53 }
54
55 void xbt_mutex_unlock(xbt_mutex_t mutex){
56    xbt_die("No pthread in SG when compiled against the ucontext");
57 }
58
59 void xbt_mutex_destroy(xbt_mutex_t mutex){
60    xbt_die("No pthread in SG when compiled against the ucontext");
61 }
62
63 xbt_thcond_t xbt_thcond_init(void){
64    xbt_die("No pthread in SG when compiled against the ucontext");
65 }
66
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");
69 }
70
71 void xbt_thcond_signal(xbt_thcond_t cond){
72    xbt_die("No pthread in SG when compiled against the ucontext");
73 }
74
75 void xbt_thcond_broadcast(xbt_thcond_t cond){
76    xbt_die("No pthread in SG when compiled against the ucontext");
77 }
78
79 void xbt_thcond_destroy(xbt_thcond_t cond){
80    xbt_die("No pthread in SG when compiled against the ucontext");
81 }
82
83
84 #endif