BUILD: threads: Rename SPIN/RWLOCK macros using HA_ prefix
This remove any name conflicts, especially on Solaris.
diff --git a/src/applet.c b/src/applet.c
index 47f30c4..0e550c2 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -38,7 +38,7 @@
if (!applets_active_queue)
return;
- SPIN_LOCK(APPLETS_LOCK, &applet_active_lock);
+ HA_SPIN_LOCK(APPLETS_LOCK, &applet_active_lock);
curr = LIST_NEXT(&applet_active_queue, typeof(curr), runq);
while (&curr->runq != &applet_active_queue) {
@@ -52,7 +52,7 @@
curr = next;
}
- SPIN_UNLOCK(APPLETS_LOCK, &applet_active_lock);
+ HA_SPIN_UNLOCK(APPLETS_LOCK, &applet_active_lock);
/* The list is only scanned from the head. This guarantees that if any
* applet removes another one, there is no side effect while walking
@@ -84,7 +84,7 @@
/* curr was left in the list, move it back to the active list */
LIST_DEL(&curr->runq);
LIST_INIT(&curr->runq);
- SPIN_LOCK(APPLETS_LOCK, &applet_active_lock);
+ HA_SPIN_LOCK(APPLETS_LOCK, &applet_active_lock);
if (curr->state & APPLET_WANT_DIE) {
curr->state = APPLET_SLEEPING;
__appctx_free(curr);
@@ -98,7 +98,7 @@
curr->state = APPLET_SLEEPING;
}
}
- SPIN_UNLOCK(APPLETS_LOCK, &applet_active_lock);
+ HA_SPIN_UNLOCK(APPLETS_LOCK, &applet_active_lock);
}
}
}
@@ -106,5 +106,5 @@
__attribute__((constructor))
static void __applet_init(void)
{
- SPIN_INIT(&applet_active_lock);
+ HA_SPIN_INIT(&applet_active_lock);
}