Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
concatenate getline.c at the end of xbt_str.c
[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_backtrace_display();
32    xbt_die("No pthread in SG when compiled against the ucontext (xbt_thread_create)");
33 }
34
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)");
38 }
39
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)");
43 }
44
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)");
48 }
49
50
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)");
54 }
55
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)");
59 }
60
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)");
64 }
65
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)");
69 }
70
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)");
74 }
75
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)");
79 }
80
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)");
84 }
85
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)");
89 }
90
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)");
94 }
95
96
97 #endif