+static inline void meshlink_queue_init(meshlink_queue_t *queue) {
+ queue->head = NULL;
+ queue->tail = NULL;
+ pthread_mutexattr_t attr;
+ pthread_mutexattr_init(&attr);
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_DEFAULT);
+ pthread_mutex_init(&queue->mutex, &attr);
+}
+