Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[surf] Remove sg_platf_storage_type_cb
[simgrid.git] / src / simix / smx_context_raw.c
index ec66021..60fad15 100644 (file)
@@ -191,7 +191,7 @@ __asm__ (
 
 
 /* If you implement raw contexts for other processors, don't forget to
-   update the definition of HAVE_RAWCTX in buildtools/Cmake/CompleteInFiles.cmake */
+   update the definition of HAVE_RAWCTX in tools/cmake/CompleteInFiles.cmake */
 
 raw_stack_t raw_makecontext(char* malloced_stack, int stack_size,
                             rawctx_entry_point_t entry_point, void* arg) {
@@ -552,7 +552,7 @@ static void smx_ctx_raw_suspend_parallel(smx_context_t context)
     XBT_DEBUG("No more processes to run");
 
     unsigned long worker_id =
-        (unsigned long) xbt_os_thread_get_specific(raw_worker_id_key);
+        (unsigned long)(uintptr_t) xbt_os_thread_get_specific(raw_worker_id_key);
 
     next_context = (smx_context_t)raw_workers_context[worker_id];
     XBT_DEBUG("Restoring worker stack %lu (working threads = %lu)",
@@ -574,7 +574,7 @@ static void smx_ctx_raw_resume_parallel(smx_process_t first_process)
 {
 #ifdef CONTEXT_THREADS
   unsigned long worker_id = __sync_fetch_and_add(&raw_threads_working, 1);
-  xbt_os_thread_set_specific(raw_worker_id_key, (void*) worker_id);
+  xbt_os_thread_set_specific(raw_worker_id_key, (void*)(uintptr_t) worker_id);
   smx_ctx_raw_t worker_context = (smx_ctx_raw_t)SIMIX_context_self();
   raw_workers_context[worker_id] = worker_context;
   XBT_DEBUG("Saving worker stack %lu", worker_id);