1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-26 23:11:19 +01:00

Merge pull request #2367 from x3ro/fix-orphaned-debug-outputs

Fix misc errors that occur with ENABLE_DEBUG
This commit is contained in:
Oleg Hahm 2015-01-30 11:05:44 +01:00
commit 5792f37e87
4 changed files with 8 additions and 8 deletions

View File

@ -107,7 +107,7 @@ void chardev_loop(ringbuffer_t *rb)
DEBUG("Data is available\n");
unsigned state = disableIRQ();
int nbytes = min(r->nbytes, rb->avail);
DEBUG("uart0_thread [%i]: sending %i bytes received from %" PRIkernel_pid " to pid %" PRIkernel_pid "\n", pid, nbytes, m.sender_pid, reader_pid);
DEBUG("uart0_thread [%i]: sending %i bytes received from %" PRIkernel_pid " to pid %" PRIkernel_pid "\n", thread_getpid(), nbytes, m.sender_pid, reader_pid);
ringbuffer_get(rb, r->buffer, nbytes);
r->nbytes = nbytes;

View File

@ -123,7 +123,7 @@ static inline void timex_normalize(timex_t *time)
* @return true for a normalized timex_t
* @return false otherwise
*/
static inline int timex_isnormalized(timex_t *time)
static inline int timex_isnormalized(const timex_t *time)
{
return (time->microseconds < SEC_IN_USEC);
}

View File

@ -29,7 +29,7 @@
timex_t timex_add(const timex_t a, const timex_t b)
{
#if ENABLE_DEBUG
if (!timex_isnormalized(a) || !timex_isnormalized(b)) {
if (!timex_isnormalized(&a) || !timex_isnormalized(&b)) {
puts("timex_add on denormalized value");
}
#endif
@ -53,7 +53,7 @@ timex_t timex_set(uint32_t seconds, uint32_t microseconds)
result.microseconds = microseconds;
#if ENABLE_DEBUG
if (!timex_isnormalized(result)) {
if (!timex_isnormalized(&result)) {
puts("timex_set on denormalized value");
}
#endif
@ -64,7 +64,7 @@ timex_t timex_set(uint32_t seconds, uint32_t microseconds)
timex_t timex_sub(const timex_t a, const timex_t b)
{
#if ENABLE_DEBUG
if (!timex_isnormalized(a) || !timex_isnormalized(b)) {
if (!timex_isnormalized(&a) || !timex_isnormalized(&b)) {
puts("timex_sub on denormalized value");
}
#endif
@ -86,7 +86,7 @@ timex_t timex_sub(const timex_t a, const timex_t b)
int timex_cmp(const timex_t a, const timex_t b)
{
#if ENABLE_DEBUG
if (!timex_isnormalized(a) || !timex_isnormalized(b)) {
if (!timex_isnormalized(&a) || !timex_isnormalized(&b)) {
puts("timex_cmp on denormalized value");
}
#endif

View File

@ -423,11 +423,11 @@ int vtimer_msg_receive_timeout(msg_t *m, timex_t timeout) {
#if ENABLE_DEBUG
void vtimer_print_short_queue(){
void vtimer_print_short_queue(void){
priority_queue_print(&shortterm_priority_queue_root);
}
void vtimer_print_long_queue(){
void vtimer_print_long_queue(void){
priority_queue_print(&longterm_priority_queue_root);
}