Skip to content
Snippets Groups Projects
Commit 7153ff2d authored by Nick Zavaritsky's avatar Nick Zavaritsky
Browse files

Fix osx/clang build

parent 5a7288bc
No related branches found
No related tags found
No related merge requests found
...@@ -660,7 +660,7 @@ void *cord_thread_func(void *p) ...@@ -660,7 +660,7 @@ void *cord_thread_func(void *p)
* CORD_ON_EXIT_WONT_RUN to prevent a future handler * CORD_ON_EXIT_WONT_RUN to prevent a future handler
* installation (since a handler won't run anyway). * installation (since a handler won't run anyway).
*/ */
struct cord_on_exit *handler = NULL; /* expected value */ const struct cord_on_exit *handler = NULL; /* expected value */
bool changed; bool changed;
changed = pm_atomic_compare_exchange_strong(&cord()->on_exit, changed = pm_atomic_compare_exchange_strong(&cord()->on_exit,
...@@ -765,7 +765,7 @@ cord_cojoin(struct cord *cord) ...@@ -765,7 +765,7 @@ cord_cojoin(struct cord *cord)
* cord->on_exit initially holds a NULL value. This field is * cord->on_exit initially holds a NULL value. This field is
* change-once. * change-once.
*/ */
struct cord_on_exit *prev_handler = NULL; /* expected value */ const struct cord_on_exit *prev_handler = NULL; /* expected value */
bool changed = pm_atomic_compare_exchange_strong(&cord->on_exit, bool changed = pm_atomic_compare_exchange_strong(&cord->on_exit,
&prev_handler, &prev_handler,
&handler); &handler);
......
...@@ -186,7 +186,7 @@ struct cord { ...@@ -186,7 +186,7 @@ struct cord {
*/ */
uint32_t max_fid; uint32_t max_fid;
pthread_t id; pthread_t id;
struct cord_on_exit *on_exit; const struct cord_on_exit *on_exit;
/** A helper hash to map id -> fiber. */ /** A helper hash to map id -> fiber. */
struct mh_i32ptr_t *fiber_registry; struct mh_i32ptr_t *fiber_registry;
/** All fibers */ /** All fibers */
......
...@@ -95,6 +95,7 @@ ...@@ -95,6 +95,7 @@
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h>
/* /*
* Removed __PM_CLANG_ATOMICS clause, this is because * Removed __PM_CLANG_ATOMICS clause, this is because
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment