sched/pthread: add missing FAR and fix alignment issues
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
parent
0370aa9988
commit
a0b19226a1
@ -50,13 +50,13 @@
|
||||
struct join_s
|
||||
{
|
||||
FAR struct join_s *next; /* Implements link list */
|
||||
uint8_t crefs; /* Reference count */
|
||||
bool detached; /* true: pthread_detached'ed */
|
||||
bool terminated; /* true: detach'ed+exit'ed */
|
||||
pthread_t thread; /* Includes pid */
|
||||
sem_t exit_sem; /* Implements join */
|
||||
sem_t data_sem; /* Implements join */
|
||||
pthread_addr_t exit_value; /* Returned data */
|
||||
uint8_t crefs; /* Reference count */
|
||||
bool detached; /* true: pthread_detached'ed */
|
||||
bool terminated; /* true: detach'ed+exit'ed */
|
||||
pthread_t thread; /* Includes pid */
|
||||
sem_t exit_sem; /* Implements join */
|
||||
sem_t data_sem; /* Implements join */
|
||||
pthread_addr_t exit_value; /* Returned data */
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
@ -90,9 +90,9 @@ void pthread_release(FAR struct task_group_s *group);
|
||||
|
||||
int pthread_sem_take(FAR sem_t *sem, FAR const struct timespec *abs_timeout);
|
||||
#ifdef CONFIG_PTHREAD_MUTEX_UNSAFE
|
||||
int pthread_sem_trytake(sem_t *sem);
|
||||
int pthread_sem_trytake(FAR sem_t *sem);
|
||||
#endif
|
||||
int pthread_sem_give(sem_t *sem);
|
||||
int pthread_sem_give(FAR sem_t *sem);
|
||||
|
||||
#ifndef CONFIG_PTHREAD_MUTEX_UNSAFE
|
||||
int pthread_mutex_take(FAR struct pthread_mutex_s *mutex,
|
||||
@ -101,9 +101,9 @@ int pthread_mutex_trytake(FAR struct pthread_mutex_s *mutex);
|
||||
int pthread_mutex_give(FAR struct pthread_mutex_s *mutex);
|
||||
void pthread_mutex_inconsistent(FAR struct tcb_s *tcb);
|
||||
#else
|
||||
# define pthread_mutex_take(m,abs_timeout) pthread_sem_take(&(m)->sem,(abs_timeout))
|
||||
# define pthread_mutex_trytake(m) pthread_sem_trytake(&(m)->sem)
|
||||
# define pthread_mutex_give(m) pthread_sem_give(&(m)->sem)
|
||||
# define pthread_mutex_take(m,abs_timeout) pthread_sem_take(&(m)->sem,(abs_timeout))
|
||||
# define pthread_mutex_trytake(m) pthread_sem_trytake(&(m)->sem)
|
||||
# define pthread_mutex_give(m) pthread_sem_give(&(m)->sem)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PTHREAD_MUTEX_TYPES
|
||||
|
@ -75,7 +75,7 @@ int pthread_sem_take(FAR sem_t *sem, FAR const struct timespec *abs_timeout)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PTHREAD_MUTEX_UNSAFE
|
||||
int pthread_sem_trytake(sem_t *sem)
|
||||
int pthread_sem_trytake(FAR sem_t *sem)
|
||||
{
|
||||
int ret = EINVAL;
|
||||
|
||||
@ -94,7 +94,7 @@ int pthread_sem_trytake(sem_t *sem)
|
||||
}
|
||||
#endif
|
||||
|
||||
int pthread_sem_give(sem_t *sem)
|
||||
int pthread_sem_give(FAR sem_t *sem)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user