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
Python: many improvements; add a new example (actor-migration)
[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
79242cd
..
5b0f98f
100644
(file)
--- a/
src/xbt/xbt_os_thread.c
+++ b/
src/xbt/xbt_os_thread.c
@@
-305,7
+305,7
@@
xbt_os_sem_t xbt_os_sem_init(unsigned int value)
{
xbt_os_sem_t res = xbt_new(s_xbt_os_sem_t, 1);
- /* On some systems (
MAC OS X
), only the stub of sem_init is to be found.
+ /* On some systems (
macOS
), only the stub of sem_init is to be found.
* Any attempt to use it leads to ENOSYS (function not implemented).
* If such a prehistoric system is detected, do the job with sem_open instead
*/
@@
-366,31
+366,6
@@
void xbt_os_sem_destroy(xbt_os_sem_t sem)
xbt_free(sem);
}
-/** @brief Returns the amount of cores on the current host */
-int xbt_os_get_numcores(void) {
-#ifdef WIN32
- SYSTEM_INFO sysinfo;
- GetSystemInfo(&sysinfo);
- return sysinfo.dwNumberOfProcessors;
-#elif defined(__APPLE__) && defined(__MACH__)
- int nm[2];
- size_t len = 4;
- uint32_t count;
-
- nm[0] = CTL_HW; nm[1] = HW_AVAILCPU;
- sysctl(nm, 2, &count, &len, NULL, 0);
-
- if(count < 1) {
- nm[1] = HW_NCPU;
- sysctl(nm, 2, &count, &len, NULL, 0);
- if(count < 1) { count = 1; }
- }
- return count;
-#else
- return sysconf(_SC_NPROCESSORS_ONLN);
-#endif
-}
-
void xbt_os_thread_set_extra_data(void *data)
{
xbt_os_thread_self()->extra_data = data;