git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@184 35acf78f-673a-0410-8e92-d51de3d6d3f4
parent
86f169d26d
commit
811bbbc8fb
|
@ -40,7 +40,7 @@ AVR-AT90CANx-GCC - Port on AVR AT90CAN128, not complete yet.
|
|||
*****************************************************************************
|
||||
|
||||
*** 0.5.3 ***
|
||||
- Removed the chMsgSendTimeout() API, it was conceptually flawed because
|
||||
- Removed the chMsgSendTimeout() API, it was conceptually flawed because,
|
||||
after sending a message, the sender *has* to wait for the answer or
|
||||
the next sender in queue would receive it instead (the messages server has
|
||||
no way to know that the sender is gone because a timeout).
|
||||
|
@ -49,8 +49,9 @@ AVR-AT90CANx-GCC - Port on AVR AT90CAN128, not complete yet.
|
|||
- Removed the test case for chMsgSendTimeout() from the test suite.
|
||||
- Space saved by reorganizing the timeout code into a single scheduler
|
||||
function.
|
||||
- Space optimizations in the semaphores code.
|
||||
- The API chThdSleepUntil() become a macro saving some more code space.
|
||||
- Because all the above changes the kernel code (ARM) is over 600 bytes
|
||||
- Because all the above changes the kernel code (ARM) is over 700 bytes
|
||||
smaller.
|
||||
|
||||
*** 0.5.2 ***
|
||||
|
|
|
@ -53,9 +53,9 @@ void chEvtRegister(EventSource *esp, EventListener *elp, t_eventid eid) {
|
|||
* @param elp pointer to the \p EventListener structure
|
||||
* @note If the event listener is not registered on the specified event source
|
||||
* then the function does nothing.
|
||||
* @note For optimal performance perform the unregister operations in inverse
|
||||
* order of the register operations (elements are found on top of the
|
||||
* list).
|
||||
* @note For optimal performance it is better to perform the unregister
|
||||
* operations in inverse order of the register operations (elements are
|
||||
* found on top of the list).
|
||||
*/
|
||||
void chEvtUnregister(EventSource *esp, EventListener *elp) {
|
||||
EventListener *p = (EventListener *)esp;
|
||||
|
|
|
@ -90,6 +90,7 @@ void chSchGoSleepS(t_tstate newstate) {
|
|||
chSysSwitchI(otp, currp);
|
||||
}
|
||||
|
||||
#ifdef CH_USE_VIRTUAL_TIMERS
|
||||
static void wakeup(void *p) {
|
||||
|
||||
if (((Thread *)p)->p_state == PRWTSEM)
|
||||
|
@ -116,6 +117,7 @@ t_msg chSchGoSleepTimeoutS(t_tstate newstate, t_time time) {
|
|||
chVTResetI(&vt);
|
||||
return currp->p_rdymsg;
|
||||
}
|
||||
#endif /* CH_USE_VIRTUAL_TIMERS */
|
||||
|
||||
/**
|
||||
* Wakeups a thread, the thread is inserted into the ready list or made
|
||||
|
|
11
src/chsem.c
11
src/chsem.c
|
@ -47,18 +47,11 @@ void chSemInit(Semaphore *sp, t_cnt n) {
|
|||
* \p RDY_RESET.
|
||||
*/
|
||||
void chSemReset(Semaphore *sp, t_cnt n) {
|
||||
t_cnt cnt;
|
||||
|
||||
chDbgAssert(n >= 0, "chsem.c, chSemReset()");
|
||||
chSysLock();
|
||||
|
||||
cnt = sp->s_cnt;
|
||||
sp->s_cnt = n;
|
||||
if (cnt < 0) {
|
||||
while (cnt++)
|
||||
chSchReadyI(fifo_remove(&sp->s_queue), RDY_RESET);
|
||||
chSchRescheduleS();
|
||||
}
|
||||
chSemResetI(sp, n);
|
||||
chSchRescheduleS();
|
||||
|
||||
chSysUnlock();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue