optimize code standard

This commit is contained in:
Liu_Weichao
2021-04-30 16:01:38 +08:00
parent 3ba05d0a71
commit adcfd5e7f6
70 changed files with 1596 additions and 1773 deletions

View File

@@ -42,8 +42,8 @@ DoubleLinklistType xiaoshan_task_head ={&xiaoshan_task_head, &xiaoshan_task_head
#define BITMAP_CACULATE_COLUMN_OFFSET(offset,n) (offset = n / 8)
#endif
#define BITMAP_SETCOLUMN(column,offset) (column = 1 << offset)
#define BITMAP_SETROW(row,offset) (row = 1 << offset)
#define BITMAP_SETCOLUMN(column,offset) (column = (1 << offset))
#define BITMAP_SETROW(row,offset) (row = (1 << offset))
#define BITLOWMASK_3BIT (0x7)

View File

@@ -24,7 +24,7 @@
#include <xs_assign.h>
#ifdef ARCH_SMP
struct Spin_Lockfileops spinlock;
struct SpinLockfileOps spinlock;
/*
* lock scheduler
*/
@@ -50,7 +50,7 @@ static void EnablePreempt(void)
EnableLocalInterrupt(lock);
}
void InitSpinLock( struct Spin_Lockfileops * spinlock)
void InitSpinLock( struct SpinLockfileOps * spinlock)
{
InitHwSpinlock(&spinlock->node_lock.lock);
spinlock->SPinLock = _SpinLock;
@@ -60,19 +60,19 @@ static void EnablePreempt(void)
}
void _SpinLock(struct Spin_Lockfileops * spinlock)
void _SpinLock(struct SpinLockfileOps * spinlock)
{
DisablePreempt();
HwLockSpinlock(&spinlock->node_lock.lock);
}
void _UnlockSpinLock(struct Spin_Lockfileops * spinlock)
void _UnlockSpinLock(struct SpinLockfileOps * spinlock)
{
HwUnlockSpinlock(&spinlock->node_lock.lock);
EnablePreempt();
}
x_base _SpinLockIrqSave(struct Spin_Lockfileops * spinlock)
x_base _SpinLockIrqSave(struct SpinLockfileOps * spinlock)
{
x_base lock = 0;
@@ -84,7 +84,7 @@ x_base _SpinLockIrqSave(struct Spin_Lockfileops * spinlock)
return lock;
}
void _UnlockSpinLockIrqRestore(struct Spin_Lockfileops * spinlock, x_base lock)
void _UnlockSpinLockIrqRestore(struct SpinLockfileOps * spinlock, x_base lock)
{
HwUnlockSpinlock(&spinlock->node_lock.lock);
EnableLocalInterrupt(lock);

View File

@@ -25,9 +25,9 @@
DECLARE_ID_MANAGER(k_mq_id_manager, ID_NUM_MAX);
DoubleLinklistType k_mq_list = {&k_mq_list, &k_mq_list};
struct mq_message
struct MqMessage
{
struct mq_message *next;
struct MqMessage *next;
};
static struct MsgQueue *GetMsgQueueById(int32 id)
@@ -195,7 +195,7 @@ static x_err_t _MsgQueueRecv(struct MsgQueue *mq,
x_ubase lock = 0;
uint32 tick_delta = 0;
int32 timeout = 0;
struct mq_message *msg = NONE;
struct MqMessage *msg = NONE;
struct TaskDescriptor *task = NONE;
NULL_PARAM_CHECK(mq);