A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'v3_9_90' into hypervisor
[simgrid.git]
/
src
/
xbt
/
xbt_os_thread.c
diff --git
a/src/xbt/xbt_os_thread.c
b/src/xbt/xbt_os_thread.c
index
4b7d8fb
..
93fee90
100644
(file)
--- a/
src/xbt/xbt_os_thread.c
+++ b/
src/xbt/xbt_os_thread.c
@@
-2,13
+2,13
@@
/* Used in RL to get win/lin portability, and in SG when CONTEXT_THREAD */
/* in SG, when using CONTEXT_UCONTEXT, xbt_os_thread_stub is used instead */
/* Used in RL to get win/lin portability, and in SG when CONTEXT_THREAD */
/* in SG, when using CONTEXT_UCONTEXT, xbt_os_thread_stub is used instead */
-/* Copyright (c) 2007
, 2008, 2009, 2010
. The SimGrid Team.
+/* Copyright (c) 2007
-2013
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "
gras
_config.h"
+#include "
internal
_config.h"
#include "xbt/sysdep.h"
#include "xbt/ex.h"
#include "xbt/ex_interface.h" /* We play crude games with exceptions */
#include "xbt/sysdep.h"
#include "xbt/ex.h"
#include "xbt/ex_interface.h" /* We play crude games with exceptions */
@@
-330,7
+330,7
@@
void xbt_os_mutex_timedacquire(xbt_os_mutex_t mutex, double delay)
THROWF(timeout_error, 0, "mutex %p not ready", mutex);
default:
THROWF(system_error, errcode,
THROWF(timeout_error, 0, "mutex %p not ready", mutex);
default:
THROWF(system_error, errcode,
- "xbt_mutex_timedacquire(%p) failed: %s", mutex,
+ "xbt_
os_
mutex_timedacquire(%p) failed: %s", mutex,
strerror(errcode));
}
strerror(errcode));
}
@@
-1234,7
+1234,8
@@
void xbt_os_thread_set_extra_data(void *data)
void *xbt_os_thread_get_extra_data(void)
{
void *xbt_os_thread_get_extra_data(void)
{
- return xbt_os_thread_self()->extra_data;
+ xbt_os_thread_t self = xbt_os_thread_self();
+ return self? self->extra_data : NULL;
}
xbt_os_rmutex_t xbt_os_rmutex_init(void)
}
xbt_os_rmutex_t xbt_os_rmutex_init(void)