Made sys_arch_prot() interface more generic by returning sys_prot_t instead
of u32_t.
This commit is contained in:
parent
eef68488bc
commit
68db26a7ab
|
@ -49,6 +49,7 @@ struct timeval {
|
|||
typedef NU_SEMAPHORE * sys_sem_t;
|
||||
typedef NU_QUEUE * sys_mbox_t;
|
||||
typedef NU_TASK * sys_thread_t;
|
||||
typedef u32_t sys_prot_t;
|
||||
|
||||
/* Functions specific to Coldfire/Nucleus */
|
||||
void
|
||||
|
|
|
@ -549,7 +549,7 @@ sys_setvect(u32_t vector, void (*isr_function)(void), void (*dis_funct)(void))
|
|||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
u32_t
|
||||
sys_prot_t
|
||||
sys_arch_protect(void)
|
||||
{
|
||||
return NU_Control_Interrupts(NU_DISABLE_INTERRUPTS);
|
||||
|
@ -557,7 +557,7 @@ sys_arch_protect(void)
|
|||
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
void
|
||||
sys_arch_unprotect(u32_t pval)
|
||||
sys_arch_unprotect(sys_prot_t pval)
|
||||
{
|
||||
NU_Control_Interrupts(pval);
|
||||
}
|
||||
|
|
|
@ -38,6 +38,8 @@
|
|||
#define SYS_MBOX_NULL NULL
|
||||
#define SYS_SEM_NULL NULL
|
||||
|
||||
typedef u32_t sys_prot_t;
|
||||
|
||||
struct sys_sem;
|
||||
typedef struct sys_sem * sys_sem_t;
|
||||
|
||||
|
|
|
@ -455,7 +455,7 @@ sys_arch_timeouts(void)
|
|||
return &thread->timeouts;
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
u32_t
|
||||
sys_prot_t
|
||||
sys_arch_protect(void)
|
||||
{
|
||||
/* Note that for the UNIX port, we are using a lightweight mutex, and our
|
||||
|
@ -476,7 +476,7 @@ sys_arch_protect(void)
|
|||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
void
|
||||
sys_arch_unprotect(u32_t pval)
|
||||
sys_arch_unprotect(sys_prot_t pval)
|
||||
{
|
||||
if (lwprot_thread == pthread_self())
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue