Closed snahmad closed 2 years ago
Hi @snahmad
FREERTOS_POSIX_MUTEX_INITIALIZER
being used in the application code? The only use case of FREERTOS_POSIX_MUTEX_INITIALIZER
in the +POSIX code is at FreeRTOS_POSIX_pthread_mutex.c#L126, but it's correctly used for assigning to a pthread_mutex_internal_t
type, hence why I wonder whether the macro has been used elsewhere in the app.
As @dachalco pointed, is this error coming from a usage of the initializer in application code ? If so can you show how is it being used ?
FREERTOS_POSIX_MUTEX_INITIALIZER
is supposed to be an internal macro and should not be used in application code (hence defined in FreeRTOS_POSIX_internal.h
). The correct usage should be to use PTHREAD_MUTEX_INITIALIZER
as shown in the test example below:
I will close the issue due to inactivity. Please open an issue if you still have issues.
define FREERTOS_POSIX_MUTEX_INITIALIZER \
FreeRTOS_POSIX_internal.h:64:5: error: incompatible types when initializing type 'long unsigned int' using type 'pthread_mutex_internal_t' {aka 'struct pthread_mutex_internal'}