Made sys_arch_prot() interface more generic by returning sys_prot_t instead

of u32_t.
This commit is contained in:
davidhaas 2003-02-12 16:38:57 +00:00
parent eef68488bc
commit 68db26a7ab
4 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -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);
}

View File

@ -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;

View File

@ -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())
{