Ejemplo n.º 1
0
//once  priority
void thread_resume(struct thread *th)
{
    CPU_SR_ALLOC();

    CPU_INT_DIS();
	th->suspend_timeout = 0;
    /* th->resume_cnt = (th->resume_cnt == 255) ? 255 : th->resume_cnt+1; */
    th->resume_cnt = 1;

    thread_ins->os_resume(th->priority);
    CPU_INT_EN();
}
Ejemplo n.º 2
0
//should wait all priority
void thread_suspend(struct thread *th, int timeout)
{
    CPU_SR_ALLOC();

    CPU_INT_DIS();
    th->suspend_timeout = timeout;
    //suspend now
    if (timeout == 0)
    {
        /* th->resume_cnt = (th->resume_cnt) ? th->resume_cnt-1 : 0; */
        th->resume_cnt = 0;
    }
    CPU_INT_EN();
}
Ejemplo n.º 3
0
/*----------------------------------------------------------------------*
                              rtp_irq_enable
 *----------------------------------------------------------------------*/
void rtp_irq_enable(void)
{
	CPU_INT_EN();
}