Commit 1f67dcbd authored by Christopher Friedt's avatar Christopher Friedt Committed by Chris Friedt
Browse files

posix: remove deprecated non-standard PTHREAD_MUTEX_DEFINE, etc



Remove the previously deprecated and non-standard macros
* PTHREAD_MUTEX_DEFINE()
* PTHREAD_COND_DEFINE()

Signed-off-by: default avatarChristopher Friedt <cfriedt@meta.com>
parent 87d056bd
Loading
Loading
Loading
Loading
+0 −24
Original line number Diff line number Diff line
@@ -52,18 +52,6 @@ extern "C" {
 */
#define PTHREAD_COND_INITIALIZER (-1)

/**
 * @brief Declare a pthread condition variable
 *
 * Declaration API for a pthread condition variable.  This is not a
 * POSIX API, it's provided to better conform with Zephyr's allocation
 * strategies for kernel objects.
 *
 * @param name Symbol name of the condition variable
 * @deprecated Use @c PTHREAD_COND_INITIALIZER instead.
 */
#define PTHREAD_COND_DEFINE(name) pthread_cond_t name = PTHREAD_COND_INITIALIZER

/**
 * @brief POSIX threading compatibility API
 *
@@ -148,18 +136,6 @@ int pthread_condattr_setclock(pthread_condattr_t *att, clockid_t clock_id);
 */
#define PTHREAD_MUTEX_INITIALIZER (-1)

/**
 * @brief Declare a pthread mutex
 *
 * Declaration API for a pthread mutex.  This is not a POSIX API, it's
 * provided to better conform with Zephyr's allocation strategies for
 * kernel objects.
 *
 * @param name Symbol name of the mutex
 * @deprecated Use @c PTHREAD_MUTEX_INITIALIZER instead.
 */
#define PTHREAD_MUTEX_DEFINE(name) pthread_mutex_t name = PTHREAD_MUTEX_INITIALIZER

/*
 *  Mutex attributes - type
 *
+3 −6
Original line number Diff line number Diff line
@@ -33,12 +33,9 @@ K_THREAD_STACK_ARRAY_DEFINE(stack_1, 1, 32);
void *thread_top_exec(void *p1);
void *thread_top_term(void *p1);

PTHREAD_MUTEX_DEFINE(lock);

PTHREAD_COND_DEFINE(cvar0);

PTHREAD_COND_DEFINE(cvar1);

static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t cvar0 = PTHREAD_COND_INITIALIZER;
static pthread_cond_t cvar1 = PTHREAD_COND_INITIALIZER;
static pthread_barrier_t barrier;

sem_t main_sem;