A const storage class to to phthread parameters. From Freddie Chopin

This commit is contained in:
Gregory Nutt
2014-09-08 06:21:48 -06:00
parent f24072a91b
commit e953fb11cd
9 changed files with 18 additions and 18 deletions
+1 -1
View File
@@ -65,7 +65,7 @@
*
****************************************************************************/
int pthread_cond_init(FAR pthread_cond_t *cond, FAR pthread_condattr_t *attr)
int pthread_cond_init(FAR pthread_cond_t *cond, FAR const pthread_condattr_t *attr)
{
int ret = OK;
+2 -2
View File
@@ -228,7 +228,7 @@ static void pthread_start(void)
*
****************************************************************************/
int pthread_create(FAR pthread_t *thread, FAR pthread_attr_t *attr,
int pthread_create(FAR pthread_t *thread, FAR const pthread_attr_t *attr,
pthread_startroutine_t start_routine, pthread_addr_t arg)
{
FAR struct pthread_tcb_s *ptcb;
@@ -245,7 +245,7 @@ int pthread_create(FAR pthread_t *thread, FAR pthread_attr_t *attr,
if (!attr)
{
attr = (FAR pthread_attr_t *)&g_default_pthread_attr;
attr = &g_default_pthread_attr;
}
/* Allocate a TCB for the new task. */
+1 -1
View File
@@ -86,7 +86,7 @@
*
****************************************************************************/
int pthread_mutex_init(FAR pthread_mutex_t *mutex, FAR pthread_mutexattr_t *attr)
int pthread_mutex_init(FAR pthread_mutex_t *mutex, FAR const pthread_mutexattr_t *attr)
{
int pshared = 0;
#ifdef CONFIG_MUTEX_TYPES
+2 -2
View File
@@ -112,7 +112,7 @@
*
****************************************************************************/
int pthread_setspecific(pthread_key_t key, FAR void *value)
int pthread_setspecific(pthread_key_t key, FAR const void *value)
{
#if CONFIG_NPTHREAD_KEYS > 0
FAR struct pthread_tcb_s *rtcb = (FAR struct pthread_tcb_s*)g_readytorun.head;
@@ -128,7 +128,7 @@ int pthread_setspecific(pthread_key_t key, FAR void *value)
{
/* Store the data in the TCB. */
rtcb->pthread_data[key] = value;
rtcb->pthread_data[key] = (FAR void*)value;
/* Return success. */