zephyr/include/posix
Nicolas Pitre ca49d6a857 PTHREAD_MUTEX_DEFINE(): don't store into the _k_mutex section
The _k_mutex linker section is used to gather instances of
struct k_mutex into a list so that init_mutex_module() could iterate
that list to perform runtime initialization tasks. In this case, we're
not defining a struct k_mutex but rather a struct pthread_mutex which is
a completely different structure. Not only those struct pthread_mutex
would be corrupted with unexpected data, but since they're not the
same size as struct k_mutex, the actual struct k_mutex instances that
follow in the list would be misaligned and get corrupted too.

There is nothing that requires runtime initialization in the static
definition of a struct pthread_mutex so let's remove the section
attribute.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-06-04 09:24:08 -04:00
..
sys posix: sys/time.h: Add workaround for outdated newlib used by Xtensa 2019-05-07 22:18:09 -04:00
dirent.h lib: posix: Fix compile issue with newer newlib 2019-02-22 11:55:01 -06:00
mqueue.h lib: posix: Fix compile error with mqueue.h 2019-02-23 11:42:31 -06:00
posix_sched.h posix: rename priority in sched_param struct 2019-02-19 11:24:45 -05:00
posix_types.h lib: posix: Fix compile issue with newer newlib 2019-02-22 11:55:01 -06:00
pthread.h PTHREAD_MUTEX_DEFINE(): don't store into the _k_mutex section 2019-06-04 09:24:08 -04:00
pthread_key.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
semaphore.h lib: posix: Fix compile issue with newer newlib 2019-02-22 11:55:01 -06:00
signal.h lib: posix: Fix compile issue with newer newlib 2019-02-22 11:55:01 -06:00
time.h posix: Move gettimeofday declaration to <sys/time.h> 2019-05-07 22:18:09 -04:00
unistd.h lib: posix: Fix compile error with mqueue.h 2019-02-23 11:42:31 -06:00