IssueNo:#I3HGTM
Description: Fix some macro definitions of limits.h. Feature or Bugfix: Bugfix Binary Source:NA Change-Id: I419c712f8605f8a0d2d6cb0b6c3831cea0e742e1
This commit is contained in:
parent
2c17c08c03
commit
caffe81339
|
@ -1,6 +1,8 @@
|
||||||
#ifndef _LIMITS_H
|
#ifndef _LIMITS_H
|
||||||
#define _LIMITS_H
|
#define _LIMITS_H
|
||||||
|
|
||||||
|
#include "los_config.h"
|
||||||
|
|
||||||
#ifdef __ICCARM__ /* for iar */
|
#ifdef __ICCARM__ /* for iar */
|
||||||
#define PATH_MAX 256
|
#define PATH_MAX 256
|
||||||
#define MQ_PRIO_MAX 1
|
#define MQ_PRIO_MAX 1
|
||||||
|
@ -73,9 +75,9 @@
|
||||||
#define PTHREAD_KEYS_MAX 128
|
#define PTHREAD_KEYS_MAX 128
|
||||||
#define PTHREAD_STACK_MIN LOSCFG_BASE_CORE_TSK_MIN_STACK_SIZE
|
#define PTHREAD_STACK_MIN LOSCFG_BASE_CORE_TSK_MIN_STACK_SIZE
|
||||||
#define PTHREAD_DESTRUCTOR_ITERATIONS 4
|
#define PTHREAD_DESTRUCTOR_ITERATIONS 4
|
||||||
#define SEM_VALUE_MAX 0x7fffffff
|
#define SEM_VALUE_MAX OS_SEM_COUNTING_MAX_COUNT
|
||||||
#define SEM_NSEMS_MAX 256
|
#define SEM_NSEMS_MAX LOSCFG_BASE_IPC_SEM_LIMIT
|
||||||
#define DELAYTIMER_MAX 0x7fffffff
|
#define DELAYTIMER_MAX 32
|
||||||
#define MQ_PRIO_MAX 1
|
#define MQ_PRIO_MAX 1
|
||||||
#define LOGIN_NAME_MAX 256
|
#define LOGIN_NAME_MAX 256
|
||||||
|
|
||||||
|
|
|
@ -268,6 +268,14 @@ extern "C" {
|
||||||
#define LOSCFG_BASE_IPC_SEM_LIMIT 6
|
#define LOSCFG_BASE_IPC_SEM_LIMIT 6
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup los_config
|
||||||
|
* Maximum number of semaphores.
|
||||||
|
*/
|
||||||
|
#ifndef OS_SEM_COUNTING_MAX_COUNT
|
||||||
|
#define OS_SEM_COUNTING_MAX_COUNT 0xFFFF
|
||||||
|
#endif
|
||||||
|
|
||||||
/* =============================================================================
|
/* =============================================================================
|
||||||
Mutex module configuration
|
Mutex module configuration
|
||||||
============================================================================= */
|
============================================================================= */
|
||||||
|
|
|
@ -285,11 +285,6 @@ extern UINT32 LOS_SemPend(UINT32 semHandle, UINT32 timeout);
|
||||||
*/
|
*/
|
||||||
extern UINT32 LOS_SemPost(UINT32 semHandle);
|
extern UINT32 LOS_SemPost(UINT32 semHandle);
|
||||||
|
|
||||||
enum LosSemMaxCount {
|
|
||||||
OS_SEM_COUNTING_MAX_COUNT = 0xFFFF, /**< Max count of counting semaphores */
|
|
||||||
OS_SEM_BINARY_MAX_COUNT = 1 /**< Max count of binary semaphores */
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup los_sem
|
* @ingroup los_sem
|
||||||
* Semaphore control structure.
|
* Semaphore control structure.
|
||||||
|
@ -302,24 +297,30 @@ typedef struct {
|
||||||
LOS_DL_LIST semList; /**< Queue of tasks that are waiting on a semaphore */
|
LOS_DL_LIST semList; /**< Queue of tasks that are waiting on a semaphore */
|
||||||
} LosSemCB;
|
} LosSemCB;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup los_config
|
||||||
|
* Max count of binary semaphores.
|
||||||
|
*/
|
||||||
|
#define OS_SEM_BINARY_MAX_COUNT 1
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup los_sem
|
* @ingroup los_sem
|
||||||
* The semaphore is not in use.
|
* The semaphore is not in use.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#define OS_SEM_UNUSED 0
|
#define OS_SEM_UNUSED 0
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup los_sem
|
* @ingroup los_sem
|
||||||
* The semaphore is used.
|
* The semaphore is used.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#define OS_SEM_USED 1
|
#define OS_SEM_USED 1
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup los_sem
|
* @ingroup los_sem
|
||||||
* Obtain the head node in a semaphore doubly linked list.
|
* Obtain the head node in a semaphore doubly linked list.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#define GET_SEM_LIST(ptr) LOS_DL_LIST_ENTRY(ptr, LosSemCB, semList)
|
#define GET_SEM_LIST(ptr) LOS_DL_LIST_ENTRY(ptr, LosSemCB, semList)
|
||||||
|
|
||||||
extern LosSemCB *g_allSem;
|
extern LosSemCB *g_allSem;
|
||||||
/**
|
/**
|
||||||
* @ingroup los_sem
|
* @ingroup los_sem
|
||||||
|
|
Loading…
Reference in New Issue