/*#*
*#* $Log$
+ *#* Revision 1.19 2004/12/13 11:51:08 bernie
+ *#* DISABLE_INTS/ENABLE_INTS: Convert to IRQ_DISABLE/IRQ_ENABLE.
+ *#*
*#* Revision 1.18 2004/12/08 08:03:48 bernie
*#* Doxygen fixes.
*#*
/* Disable Recv complete IRQ */
//UCSR0B &= ~BV(RXCIE);
- //ENABLE_INTS;
+ //IRQ_ENABLE;
/* Should be read before UDR */
ser_uart0->status |= UCSR0A & (SERRF_RXSROVERRUN | SERRF_FRAMEERROR);
}
/* Reenable receive complete int */
- //DISABLE_INTS;
+ //IRQ_DISABLE;
//UCSR0B |= BV(RXCIE);
SER_STROBE_OFF;
/* Disable Recv complete IRQ */
//UCSR1B &= ~BV(RXCIE);
- //ENABLE_INTS;
+ //IRQ_ENABLE;
/* Should be read before UDR */
ser_uart1->status |= UCSR1A & (SERRF_RXSROVERRUN | SERRF_FRAMEERROR);
/*#*
*#* $Log$
+ *#* Revision 1.5 2004/12/13 11:51:08 bernie
+ *#* DISABLE_INTS/ENABLE_INTS: Convert to IRQ_DISABLE/IRQ_ENABLE.
+ *#*
*#* Revision 1.4 2004/08/25 14:12:08 rasky
*#* Aggiornato il comment block dei log RCS
*#*
#include "serhw.h"
#define SER_HW_ENABLE_TX \
- DISABLE_INTS; \
- if (!ser_sending) \
- { \
- ser_sending = true; \
- (INT_PEND1 |= INT1F_TI) \
- } \
- ENABLE_INTS;
+ ATOMIC( \
+ if (!ser_sending) \
+ { \
+ ser_sending = true; \
+ (INT_PEND1 |= INT1F_TI) \
+ } \
+ );
static volatile bool ser_sending;
/*#*
*#* $Log$
+ *#* Revision 1.4 2004/12/13 11:51:08 bernie
+ *#* DISABLE_INTS/ENABLE_INTS: Convert to IRQ_DISABLE/IRQ_ENABLE.
+ *#*
*#* Revision 1.3 2004/08/25 14:12:08 rasky
*#* Aggiornato il comment block dei log RCS
*#*
# define TIMER_INIT \
TIMER2 = (65535 - TICKS_RATE); \
INT_MASK1 |= INT1F_T2OVF; \
- \
- DISABLE_INTS; \
- WSR = 1; \
- IOC3 |= IOC3F_T2_ENA; \
- WSR = 0; \
- ENABLE_INTS
+ ATOMIC( \
+ WSR = 1; \
+ IOC3 |= IOC3F_T2_ENA; \
+ WSR = 0; \
+ )
#define DEFINE_TIMER_ISR \
INTERRUPT(0x38) void TM2_OVFL_interrupt(void); \
/*#*
*#* $Log$
+ *#* Revision 1.22 2004/12/13 11:51:08 bernie
+ *#* DISABLE_INTS/ENABLE_INTS: Convert to IRQ_DISABLE/IRQ_ENABLE.
+ *#*
*#* Revision 1.21 2004/11/28 23:20:25 bernie
*#* Remove obsolete INITLIST macro.
*#*
* the compiler might put them on the stack of the process
* being switched out.
*/
- static Process *old_process;
+ static struct Process *old_process;
static cpuflags_t flags;
/* Remember old process to save its context later */
/* Poll on the ready queue for the first ready process */
DISABLE_IRQSAVE(flags);
- while (!(CurrentProcess = (struct Process*)REMHEAD(&ProcReadyList)))
+ while (!(CurrentProcess = (struct Process *)REMHEAD(&ProcReadyList)))
{
/*
* Make sure we physically reenable interrupts here, no matter what
* are idle-spinning, we must allow interrupts, otherwise no
* process will ever wake up.
*
- * \todo If there was a way to code sig_wait so that it does not
+ * \todo If there was a way to write sig_wait() so that it does not
* disable interrupts while waiting, there would not be any
* reason to do this.
*/
- ENABLE_INTS;
+ IRQ_ENABLE;
SCHEDULER_IDLE;
- DISABLE_INTS;
+ IRQ_DISABLE;
}
ENABLE_IRQRESTORE(flags);
- /* Optimization: don't switch contexts when the active
+ /*
+ * Optimization: don't switch contexts when the active
* process has not changed.
*/
if (CurrentProcess != old_process)
{
- static cpustack_t* dummy;
+ static cpustack_t *dummy;
#if CONFIG_KERN_PREEMPTIVE
/* Reset quantum for this process */