diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-11-23 22:32:52 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-11-23 22:32:52 +0000 |
commit | 2937aaaaf09c2f0d5b46b1a2a30eac962d8455d3 (patch) | |
tree | 4c931c8603e4c674f6eec802044b430a953536db /nuttx/sched | |
parent | fa64306fac12fed8522ab0facdb2cd7f211b2d30 (diff) | |
download | px4-nuttx-2937aaaaf09c2f0d5b46b1a2a30eac962d8455d3.tar.gz px4-nuttx-2937aaaaf09c2f0d5b46b1a2a30eac962d8455d3.tar.bz2 px4-nuttx-2937aaaaf09c2f0d5b46b1a2a30eac962d8455d3.zip |
Debug can now be selectively enabled by subystem
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@404 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched')
45 files changed, 119 insertions, 118 deletions
diff --git a/nuttx/sched/clock_getres.c b/nuttx/sched/clock_getres.c index b3d6247db..821941ba2 100644 --- a/nuttx/sched/clock_getres.c +++ b/nuttx/sched/clock_getres.c @@ -88,13 +88,13 @@ int clock_getres(clockid_t clock_id, struct timespec *res) uint32 time_res; int ret = OK; - dbg("clock_id=%d\n", clock_id); + sdbg("clock_id=%d\n", clock_id); /* Only CLOCK_REALTIME is supported */ if (clock_id != CLOCK_REALTIME) { - dbg("Returning ERROR\n"); + sdbg("Returning ERROR\n"); *get_errno_ptr() = EINVAL; ret = ERROR; } @@ -109,9 +109,9 @@ int clock_getres(clockid_t clock_id, struct timespec *res) res->tv_sec = 0; res->tv_nsec = time_res; - dbg("Returning res=(%d,%d) time_res=%d\n", - (int)res->tv_sec, (int)res->tv_nsec, - (int)time_res); + sdbg("Returning res=(%d,%d) time_res=%d\n", + (int)res->tv_sec, (int)res->tv_nsec, + (int)time_res); } return ret; diff --git a/nuttx/sched/clock_gettime.c b/nuttx/sched/clock_gettime.c index 941d49e29..68c8b6492 100644 --- a/nuttx/sched/clock_gettime.c +++ b/nuttx/sched/clock_gettime.c @@ -90,13 +90,13 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp) uint32 nsecs; int ret = OK; - dbg("clock_id=%d\n", clock_id); + sdbg("clock_id=%d\n", clock_id); /* Only CLOCK_REALTIME is supported */ if (clock_id != CLOCK_REALTIME) { - dbg("Returning ERROR\n"); + sdbg("Returning ERROR\n"); *get_errno_ptr() = EINVAL; ret = ERROR; @@ -109,17 +109,17 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp) msecs = MSEC_PER_TICK * (g_system_timer - g_tickbias); - dbg("msecs = %d g_tickbias=%d\n", - (int)msecs, (int)g_tickbias); + sdbg("msecs = %d g_tickbias=%d\n", + (int)msecs, (int)g_tickbias); /* Get the elapsed time in seconds and nanoseconds. */ secs = msecs / MSEC_PER_SEC; nsecs = (msecs - (secs * MSEC_PER_SEC)) * NSEC_PER_MSEC; - dbg("secs = %d + %d nsecs = %d + %d\n", - (int)msecs, (int)g_basetime.tv_sec, - (int)nsecs, (int)g_basetime.tv_nsec); + sdbg("secs = %d + %d nsecs = %d + %d\n", + (int)msecs, (int)g_basetime.tv_sec, + (int)nsecs, (int)g_basetime.tv_nsec); /* Add the base time to this. */ @@ -140,8 +140,8 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp) tp->tv_sec = (time_t)secs; tp->tv_nsec = (long)nsecs; - dbg("Returning tp=(%d,%d)\n", - (int)tp->tv_sec, (int)tp->tv_nsec); + sdbg("Returning tp=(%d,%d)\n", + (int)tp->tv_sec, (int)tp->tv_nsec); } return ret; diff --git a/nuttx/sched/clock_settime.c b/nuttx/sched/clock_settime.c index afd4005c5..605199c18 100644 --- a/nuttx/sched/clock_settime.c +++ b/nuttx/sched/clock_settime.c @@ -87,13 +87,13 @@ int clock_settime(clockid_t clock_id, const struct timespec *tp) { int ret = OK; - dbg("clock_id=%d\n", clock_id); + sdbg("clock_id=%d\n", clock_id); /* Only CLOCK_REALTIME is supported */ if (clock_id != CLOCK_REALTIME || !tp) { - dbg("Returning ERROR\n"); + sdbg("Returning ERROR\n"); *get_errno_ptr() = EINVAL; ret = ERROR; } @@ -110,7 +110,7 @@ int clock_settime(clockid_t clock_id, const struct timespec *tp) g_tickbias = g_system_timer; - dbg("basetime=(%d,%d) tickbias=%d\n", + sdbg("basetime=(%d,%d) tickbias=%d\n", (int)g_basetime.tv_sec, (int)g_basetime.tv_nsec, (int)g_tickbias); } diff --git a/nuttx/sched/gmtime_r.c b/nuttx/sched/gmtime_r.c index bf9923bb3..98658676e 100644 --- a/nuttx/sched/gmtime_r.c +++ b/nuttx/sched/gmtime_r.c @@ -177,7 +177,7 @@ struct tm *gmtime_r(const time_t *clock, struct tm *result) /* Get the seconds since the EPOCH */ time = *clock; - dbg("clock=%d\n", (int)time); + sdbg("clock=%d\n", (int)time); /* Convert to days, hours, minutes, and seconds since the EPOCH */ @@ -192,15 +192,15 @@ struct tm *gmtime_r(const time_t *clock, struct tm *result) sec = time; - dbg("hour=%d min=%d sec=%d\n", - (int)hour, (int)min, (int)sec); + sdbg("hour=%d min=%d sec=%d\n", + (int)hour, (int)min, (int)sec); /* Convert the days since the EPOCH to calendar day */ clock_utc2calendar(jdn, &year, &month, &day); - dbg("jdn=%d year=%d month=%d day=%d\n", - (int)jdn, (int)year, (int)month, (int)day); + sdbg("jdn=%d year=%d month=%d day=%d\n", + (int)jdn, (int)year, (int)month, (int)day); /* Then return the struct tm contents */ diff --git a/nuttx/sched/mktime.c b/nuttx/sched/mktime.c index 1c58edc37..f842e2435 100644 --- a/nuttx/sched/mktime.c +++ b/nuttx/sched/mktime.c @@ -126,14 +126,14 @@ time_t mktime(struct tm *tp) */ jdn = clock_calendar2utc(tp->tm_year+1900, tp->tm_mon+1, tp->tm_mday); - dbg("jdn=%d tm_year=%d tm_mon=%d tm_mday=%d\n", - (int)jdn, tp->tm_year, tp->tm_mon, tp->tm_mday); + sdbg("jdn=%d tm_year=%d tm_mon=%d tm_mday=%d\n", + (int)jdn, tp->tm_year, tp->tm_mon, tp->tm_mday); /* Return the seconds into the julian day. */ ret = ((jdn*24 + tp->tm_hour)*60 + tp->tm_min)*60 + tp->tm_sec; - dbg("%s:\tret=%d tm_hour=%d tm_min=%d tm_sec=%d\n", - (int)ret, tp->tm_hour, tp->tm_min, tp->tm_sec); + sdbg("ret=%d tm_hour=%d tm_min=%d tm_sec=%d\n", + (int)ret, tp->tm_hour, tp->tm_min, tp->tm_sec); return ret; } diff --git a/nuttx/sched/mq_sndinternal.c b/nuttx/sched/mq_sndinternal.c index ec5d8a27e..e81d5ae4f 100644 --- a/nuttx/sched/mq_sndinternal.c +++ b/nuttx/sched/mq_sndinternal.c @@ -207,7 +207,7 @@ FAR mqmsg_t *mq_msgalloc(void) else { - dbg("Out of messages\n"); + sdbg("Out of messages\n"); PANIC((uint32)OSERR_OUTOFMESSAGES); } } diff --git a/nuttx/sched/os_start.c b/nuttx/sched/os_start.c index 7591e8878..defcc3911 100644 --- a/nuttx/sched/os_start.c +++ b/nuttx/sched/os_start.c @@ -216,7 +216,7 @@ void os_start(void) int init_taskid; int i; - lldbg("Entry\n"); + slldbg("Entry\n"); /* Initialize all task lists */ @@ -427,7 +427,7 @@ void os_start(void) * started by spawning the user init thread of execution. */ - dbg("Starting init thread\n"); + sdbg("Starting init thread\n"); #ifndef CONFIG_CUSTOM_STACK init_taskid = task_create("init", SCHED_PRIORITY_DEFAULT, CONFIG_PROC_STACK_SIZE, @@ -440,7 +440,7 @@ void os_start(void) /* When control is return to this point, the system is idle. */ - dbg("Beginning Idle Loop\n"); + sdbg("Beginning Idle Loop\n"); for (;;) { /* Check if there is anything in the delayed deallocation list. diff --git a/nuttx/sched/pthread_attrdestroy.c b/nuttx/sched/pthread_attrdestroy.c index c71fa6271..14f7ca911 100644 --- a/nuttx/sched/pthread_attrdestroy.c +++ b/nuttx/sched/pthread_attrdestroy.c @@ -89,7 +89,7 @@ int pthread_attr_destroy(pthread_attr_t *attr) { int ret; - dbg("attr=0x%p\n", attr); + sdbg("attr=0x%p\n", attr); if (!attr) { @@ -101,7 +101,7 @@ int pthread_attr_destroy(pthread_attr_t *attr) ret = OK; } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_attrgetinheritsched.c b/nuttx/sched/pthread_attrgetinheritsched.c index e1c69346c..2771b0326 100644 --- a/nuttx/sched/pthread_attrgetinheritsched.c +++ b/nuttx/sched/pthread_attrgetinheritsched.c @@ -92,7 +92,7 @@ int pthread_attr_getinheritsched(const pthread_attr_t *attr, { int ret; - dbg("attr=0x%p inheritsched=0x%p\n", attr, inheritsched); + sdbg("attr=0x%p inheritsched=0x%p\n", attr, inheritsched); if (!attr || !inheritsched) { @@ -104,7 +104,7 @@ int pthread_attr_getinheritsched(const pthread_attr_t *attr, ret = OK; } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_attrgetschedparam.c b/nuttx/sched/pthread_attrgetschedparam.c index e33b132cd..0c24ad6ce 100644 --- a/nuttx/sched/pthread_attrgetschedparam.c +++ b/nuttx/sched/pthread_attrgetschedparam.c @@ -90,7 +90,7 @@ int pthread_attr_getschedparam(pthread_attr_t *attr, { int ret; - dbg("attr=0x%p param=0x%p\n", attr, param); + sdbg("attr=0x%p param=0x%p\n", attr, param); if (!attr || !param) { @@ -102,7 +102,7 @@ int pthread_attr_getschedparam(pthread_attr_t *attr, ret = OK; } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_attrgetschedpolicy.c b/nuttx/sched/pthread_attrgetschedpolicy.c index 67948cd95..a61a7a6a2 100644 --- a/nuttx/sched/pthread_attrgetschedpolicy.c +++ b/nuttx/sched/pthread_attrgetschedpolicy.c @@ -89,7 +89,7 @@ int pthread_attr_getschedpolicy(pthread_attr_t *attr, int *policy) { int ret; - dbg("attr=0x%p policy=0x%p\n", attr, policy); + sdbg("attr=0x%p policy=0x%p\n", attr, policy); if (!attr || !policy) { @@ -101,6 +101,6 @@ int pthread_attr_getschedpolicy(pthread_attr_t *attr, int *policy) ret = OK; } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_attrgetstacksize.c b/nuttx/sched/pthread_attrgetstacksize.c index 9b160ead6..d329f66e4 100644 --- a/nuttx/sched/pthread_attrgetstacksize.c +++ b/nuttx/sched/pthread_attrgetstacksize.c @@ -88,7 +88,7 @@ int pthread_attr_getstacksize(pthread_attr_t *attr, long *stacksize) { int ret; - dbg("attr=0x%p stacksize=0x%p\n", attr, stacksize); + sdbg("attr=0x%p stacksize=0x%p\n", attr, stacksize); if (!stacksize) { @@ -100,7 +100,7 @@ int pthread_attr_getstacksize(pthread_attr_t *attr, long *stacksize) ret = OK; } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_attrinit.c b/nuttx/sched/pthread_attrinit.c index 7f6639b9c..51f44019b 100644 --- a/nuttx/sched/pthread_attrinit.c +++ b/nuttx/sched/pthread_attrinit.c @@ -90,7 +90,7 @@ int pthread_attr_init(pthread_attr_t *attr) { int ret = OK; - dbg("attr=0x%p\n", attr); + sdbg("attr=0x%p\n", attr); if (!attr) { ret = ENOMEM; @@ -105,7 +105,7 @@ int pthread_attr_init(pthread_attr_t *attr) memcpy(attr, &g_default_pthread_attr, sizeof(pthread_attr_t)); } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_attrsetinheritsched.c b/nuttx/sched/pthread_attrsetinheritsched.c index 75468aad3..103429fa3 100644 --- a/nuttx/sched/pthread_attrsetinheritsched.c +++ b/nuttx/sched/pthread_attrsetinheritsched.c @@ -92,7 +92,7 @@ int pthread_attr_setinheritsched(pthread_attr_t *attr, { int ret; - dbg("inheritsched=%d\n", inheritsched); + sdbg("inheritsched=%d\n", inheritsched); if (!attr || (inheritsched != PTHREAD_INHERIT_SCHED && @@ -106,7 +106,7 @@ int pthread_attr_setinheritsched(pthread_attr_t *attr, ret = OK; } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_attrsetschedparam.c b/nuttx/sched/pthread_attrsetschedparam.c index c9660c31c..ab0bfacfd 100644 --- a/nuttx/sched/pthread_attrsetschedparam.c +++ b/nuttx/sched/pthread_attrsetschedparam.c @@ -90,7 +90,7 @@ int pthread_attr_setschedparam(pthread_attr_t *attr, { int ret; - dbg("attr=0x%p param=0x%p\n", attr, param); + sdbg("attr=0x%p param=0x%p\n", attr, param); if (!attr || !param) { @@ -101,7 +101,7 @@ int pthread_attr_setschedparam(pthread_attr_t *attr, attr->priority = (short)param->sched_priority; ret = OK; } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_attrsetschedpolicy.c b/nuttx/sched/pthread_attrsetschedpolicy.c index 09a9e92a0..89c0b7a13 100644 --- a/nuttx/sched/pthread_attrsetschedpolicy.c +++ b/nuttx/sched/pthread_attrsetschedpolicy.c @@ -90,7 +90,7 @@ int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy) { int ret; - dbg("attr=0x%p policy=%d\n", attr, policy); + sdbg("attr=0x%p policy=%d\n", attr, policy); #if CONFIG_RR_INTERVAL > 0 if (!attr || (policy != SCHED_FIFO && policy != SCHED_RR)) @@ -106,6 +106,6 @@ int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy) ret = OK; } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_attrsetstacksize.c b/nuttx/sched/pthread_attrsetstacksize.c index c62093f23..19aeb07c4 100644 --- a/nuttx/sched/pthread_attrsetstacksize.c +++ b/nuttx/sched/pthread_attrsetstacksize.c @@ -88,7 +88,7 @@ int pthread_attr_setstacksize(pthread_attr_t *attr, long stacksize) { int ret; - dbg("attr=0x%p stacksize=%ld\n", attr, stacksize); + sdbg("attr=0x%p stacksize=%ld\n", attr, stacksize); if (!attr || stacksize < PTHREAD_STACK_MIN) { @@ -100,7 +100,7 @@ int pthread_attr_setstacksize(pthread_attr_t *attr, long stacksize) ret = OK; } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_completejoin.c b/nuttx/sched/pthread_completejoin.c index eb3f4c011..1af8b8950 100644 --- a/nuttx/sched/pthread_completejoin.c +++ b/nuttx/sched/pthread_completejoin.c @@ -79,7 +79,7 @@ static boolean pthread_notifywaiters(FAR join_t *pjoin) int ntasks_waiting; int status; - dbg("pjoin=0x%p\n", pjoin); + sdbg("pjoin=0x%p\n", pjoin); /* Are any tasks waiting for our exit value? */ @@ -144,7 +144,7 @@ int pthread_completejoin(pid_t pid, FAR void *exit_value) { FAR join_t *pjoin; - dbg("process_id=%d exit_value=%p\n", pid, exit_value); + sdbg("process_id=%d exit_value=%p\n", pid, exit_value); /* First, find thread's structure in the private data set. */ @@ -209,7 +209,7 @@ int pthread_completejoin(pid_t pid, FAR void *exit_value) void pthread_destroyjoin(FAR join_t *pjoin) { - dbg("pjoin=0x%p\n", pjoin); + sdbg("pjoin=0x%p\n", pjoin); /* Remove the join info from the set of joins */ diff --git a/nuttx/sched/pthread_condattrdestroy.c b/nuttx/sched/pthread_condattrdestroy.c index 8cc524ae5..5f0991ddd 100644 --- a/nuttx/sched/pthread_condattrdestroy.c +++ b/nuttx/sched/pthread_condattrdestroy.c @@ -67,14 +67,14 @@ int pthread_condattr_destroy(pthread_condattr_t *attr) { int ret = OK; - dbg("attr=0x%p\n", attr); + sdbg("attr=0x%p\n", attr); if (!attr) { ret = EINVAL; } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_condattrinit.c b/nuttx/sched/pthread_condattrinit.c index 0d341dbc8..c5ebe2602 100644 --- a/nuttx/sched/pthread_condattrinit.c +++ b/nuttx/sched/pthread_condattrinit.c @@ -67,7 +67,7 @@ int pthread_condattr_init(pthread_condattr_t *attr) { int ret = OK; - dbg("attr=0x%p\n", attr); + sdbg("attr=0x%p\n", attr); if (!attr) { @@ -78,7 +78,7 @@ int pthread_condattr_init(pthread_condattr_t *attr) *attr = 0; } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_condbroadcast.c b/nuttx/sched/pthread_condbroadcast.c index 1fd129248..307f2ceb1 100644 --- a/nuttx/sched/pthread_condbroadcast.c +++ b/nuttx/sched/pthread_condbroadcast.c @@ -89,7 +89,7 @@ int pthread_cond_broadcast(pthread_cond_t *cond) int ret = OK; int sval; - dbg("cond=0x%p\n", cond); + sdbg("cond=0x%p\n", cond); if (!cond) { @@ -135,7 +135,7 @@ int pthread_cond_broadcast(pthread_cond_t *cond) sched_unlock(); } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_conddestroy.c b/nuttx/sched/pthread_conddestroy.c index 5c95577a9..286527d6f 100644 --- a/nuttx/sched/pthread_conddestroy.c +++ b/nuttx/sched/pthread_conddestroy.c @@ -67,7 +67,7 @@ int pthread_cond_destroy(pthread_cond_t *cond) { int ret = OK; - dbg("cond=0x%p\n", cond); + sdbg("cond=0x%p\n", cond); if (!cond) { @@ -81,7 +81,7 @@ int pthread_cond_destroy(pthread_cond_t *cond) ret = EINVAL; } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_condinit.c b/nuttx/sched/pthread_condinit.c index 90ee12782..98c68c87d 100644 --- a/nuttx/sched/pthread_condinit.c +++ b/nuttx/sched/pthread_condinit.c @@ -67,7 +67,7 @@ int pthread_cond_init(pthread_cond_t *cond, pthread_condattr_t *attr) { int ret = OK; - dbg("cond=0x%p attr=0x%p\n", cond, attr); + sdbg("cond=0x%p attr=0x%p\n", cond, attr); if (!cond) { @@ -83,7 +83,7 @@ int pthread_cond_init(pthread_cond_t *cond, pthread_condattr_t *attr) ret = EINVAL; } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_condsignal.c b/nuttx/sched/pthread_condsignal.c index 90698ce2a..9c792938f 100644 --- a/nuttx/sched/pthread_condsignal.c +++ b/nuttx/sched/pthread_condsignal.c @@ -88,7 +88,7 @@ int pthread_cond_signal(pthread_cond_t *cond) int ret = OK; int sval; - dbg("cond=0x%p\n", cond); + sdbg("cond=0x%p\n", cond); if (!cond) { @@ -110,16 +110,16 @@ int pthread_cond_signal(pthread_cond_t *cond) else { - dbg("sval=%d\n", sval); + sdbg("sval=%d\n", sval); if (sval < 0) { - dbg("Signalling...\n"); + sdbg("Signalling...\n"); ret = pthread_givesemaphore((sem_t*)&cond->sem); } } } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_condtimedwait.c b/nuttx/sched/pthread_condtimedwait.c index 8202dbf5c..d4d607bd7 100644 --- a/nuttx/sched/pthread_condtimedwait.c +++ b/nuttx/sched/pthread_condtimedwait.c @@ -138,7 +138,7 @@ int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, int ret = OK; int status; - dbg("cond=0x%p mutex=0x%p abstime=0x%p\n", cond, mutex, abstime); + sdbg("cond=0x%p mutex=0x%p abstime=0x%p\n", cond, mutex, abstime); /* Make sure that non-NULL references were provided. */ @@ -174,7 +174,7 @@ int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, } else { - dbg("Give up mutex...\n"); + sdbg("Give up mutex...\n"); /* We must disable pre-emption and interrupts here so that * the time stays valid until the wait begins. This adds @@ -254,7 +254,7 @@ int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, if (*get_errno_ptr() == EINTR) { - dbg("Timedout!\n"); + sdbg("Timedout!\n"); ret = ETIMEDOUT; } else @@ -274,7 +274,7 @@ int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, /* Reacquire the mutex (retaining the ret). */ - dbg("Re-locking...\n"); + sdbg("Re-locking...\n"); status = pthread_takesemaphore((sem_t*)&mutex->sem); if (!status) { @@ -299,7 +299,7 @@ int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, } } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_condwait.c b/nuttx/sched/pthread_condwait.c index cbfacf2a3..799c6b85d 100644 --- a/nuttx/sched/pthread_condwait.c +++ b/nuttx/sched/pthread_condwait.c @@ -90,7 +90,7 @@ int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) { int ret; - dbg("cond=0x%p mutex=0x%p\n", cond, mutex); + sdbg("cond=0x%p mutex=0x%p\n", cond, mutex); /* Make sure that non-NULL references were provided. */ @@ -110,7 +110,7 @@ int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) { /* Give up the mutex */ - dbg("Give up mutex / take cond\n"); + sdbg("Give up mutex / take cond\n"); sched_lock(); mutex->pid = 0; @@ -123,7 +123,7 @@ int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) /* Reacquire the mutex */ - dbg("Reacquire mutex...\n"); + sdbg("Reacquire mutex...\n"); ret |= pthread_takesemaphore((sem_t*)&mutex->sem); if (!ret) { @@ -131,7 +131,7 @@ int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) } } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_detach.c b/nuttx/sched/pthread_detach.c index a1a60acf5..a43be55bc 100644 --- a/nuttx/sched/pthread_detach.c +++ b/nuttx/sched/pthread_detach.c @@ -90,7 +90,7 @@ int pthread_detach(pthread_t thread) FAR join_t *pjoin; int ret; - dbg("Thread=%d\n", thread); + sdbg("Thread=%d\n", thread); /* Find the entry associated with this pthread. */ @@ -98,7 +98,7 @@ int pthread_detach(pthread_t thread) pjoin = pthread_findjoininfo((pid_t)thread); if (!pjoin) { - dbg("Could not find thread entry\n"); + sdbg("Could not find thread entry\n"); ret = EINVAL; } else @@ -127,6 +127,6 @@ int pthread_detach(pthread_t thread) } (void)pthread_givesemaphore(&g_join_semaphore); - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_exit.c b/nuttx/sched/pthread_exit.c index 59dea63e7..e313b34ea 100644 --- a/nuttx/sched/pthread_exit.c +++ b/nuttx/sched/pthread_exit.c @@ -92,7 +92,7 @@ void pthread_exit(FAR void *exit_value) int error_code = (int)exit_value; int status; - dbg("exit_value=%p\n", exit_value); + sdbg("exit_value=%p\n", exit_value); /* Block any signal actions that would awaken us while were * are performing the JOIN handshake. diff --git a/nuttx/sched/pthread_getschedparam.c b/nuttx/sched/pthread_getschedparam.c index 02dbd8faa..5a6ac861d 100644 --- a/nuttx/sched/pthread_getschedparam.c +++ b/nuttx/sched/pthread_getschedparam.c @@ -108,7 +108,7 @@ int pthread_getschedparam(pthread_t thread, int *policy, { int ret; - dbg("Thread ID=%d policy=0x%p param=0x%p\n", thread, policy, param); + sdbg("Thread ID=%d policy=0x%p param=0x%p\n", thread, policy, param); if (!policy || !param) { @@ -133,7 +133,7 @@ int pthread_getschedparam(pthread_t thread, int *policy, } } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_join.c b/nuttx/sched/pthread_join.c index 37908291b..9cc8ce9e9 100644 --- a/nuttx/sched/pthread_join.c +++ b/nuttx/sched/pthread_join.c @@ -99,7 +99,7 @@ int pthread_join(pthread_t thread, pthread_addr_t *pexit_value) FAR join_t *pjoin; int ret; - dbg("thread=%d\n", thread); + sdbg("thread=%d\n", thread); /* First make sure that this is not an attempt to join to * ourself. @@ -132,7 +132,7 @@ int pthread_join(pthread_t thread, pthread_addr_t *pexit_value) FAR _TCB *tcb = sched_gettcb((pthread_t)thread); - dbg("Could not find thread data\n"); + sdbg("Could not find thread data\n"); /* Case (1) or (3) -- we can't tell which. Assume (3) */ @@ -170,19 +170,19 @@ int pthread_join(pthread_t thread, pthread_addr_t *pexit_value) if (pjoin->terminated) { - dbg("Thread has terminated\n"); + sdbg("Thread has terminated\n"); /* Get the thread exit value from the terminated thread. */ if (pexit_value) { - dbg("exit_value=0x%p\n", pjoin->exit_value); + sdbg("exit_value=0x%p\n", pjoin->exit_value); *pexit_value = pjoin->exit_value; } } else { - dbg("Thread is still running\n"); + sdbg("Thread is still running\n"); /* Relinquish the data set semaphore. Since pre-emption is * disabled, we can be certain that no task has the @@ -206,7 +206,7 @@ int pthread_join(pthread_t thread, pthread_addr_t *pexit_value) if (pexit_value) { *pexit_value = pjoin->exit_value; - dbg("exit_value=0x%p\n", pjoin->exit_value); + sdbg("exit_value=0x%p\n", pjoin->exit_value); } /* Post the thread's data semaphore so that the exitting thread @@ -241,7 +241,7 @@ int pthread_join(pthread_t thread, pthread_addr_t *pexit_value) ret = OK; } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_mutexattrdestroy.c b/nuttx/sched/pthread_mutexattrdestroy.c index a61b60c87..221e8b1ca 100644 --- a/nuttx/sched/pthread_mutexattrdestroy.c +++ b/nuttx/sched/pthread_mutexattrdestroy.c @@ -88,7 +88,7 @@ int pthread_mutexattr_destroy(pthread_mutexattr_t *attr) { int ret = OK; - dbg("attr=0x%p\n", attr); + sdbg("attr=0x%p\n", attr); if (!attr) { @@ -99,6 +99,6 @@ int pthread_mutexattr_destroy(pthread_mutexattr_t *attr) attr->pshared = 0; } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_mutexattrgetpshared.c b/nuttx/sched/pthread_mutexattrgetpshared.c index 82198dfdd..3b5a869e8 100644 --- a/nuttx/sched/pthread_mutexattrgetpshared.c +++ b/nuttx/sched/pthread_mutexattrgetpshared.c @@ -88,7 +88,7 @@ int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr, int *pshared) { int ret = OK; - dbg("attr=0x%p pshared=0x%p\n", attr, pshared); + sdbg("attr=0x%p pshared=0x%p\n", attr, pshared); if (!attr || !pshared) { @@ -99,6 +99,6 @@ int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr, int *pshared) *pshared = attr->pshared; } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_mutexattrinit.c b/nuttx/sched/pthread_mutexattrinit.c index 6bddd19f4..3225ad33a 100644 --- a/nuttx/sched/pthread_mutexattrinit.c +++ b/nuttx/sched/pthread_mutexattrinit.c @@ -87,7 +87,7 @@ int pthread_mutexattr_init(pthread_mutexattr_t *attr) { int ret = OK; - dbg("attr=0x%p\n", attr); + sdbg("attr=0x%p\n", attr); if (!attr) { @@ -98,6 +98,6 @@ int pthread_mutexattr_init(pthread_mutexattr_t *attr) attr->pshared = 0; } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_mutexattrsetpshared.c b/nuttx/sched/pthread_mutexattrsetpshared.c index f25ed4639..53a616fce 100644 --- a/nuttx/sched/pthread_mutexattrsetpshared.c +++ b/nuttx/sched/pthread_mutexattrsetpshared.c @@ -88,7 +88,7 @@ int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared) { int ret = OK; - dbg("attr=0x%p pshared=%d\n", attr, pshared); + sdbg("attr=0x%p pshared=%d\n", attr, pshared); if (!attr || (pshared != 0 && pshared != 1)) { @@ -99,6 +99,6 @@ int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared) attr->pshared = pshared; } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_mutexdestroy.c b/nuttx/sched/pthread_mutexdestroy.c index 14b5727c0..e894f81ae 100644 --- a/nuttx/sched/pthread_mutexdestroy.c +++ b/nuttx/sched/pthread_mutexdestroy.c @@ -90,7 +90,7 @@ int pthread_mutex_destroy(pthread_mutex_t *mutex) int ret = OK; int status; - dbg("mutex=0x%p\n", mutex); + sdbg("mutex=0x%p\n", mutex); if (!mutex) { @@ -123,6 +123,6 @@ int pthread_mutex_destroy(pthread_mutex_t *mutex) sched_unlock(); } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_mutexinit.c b/nuttx/sched/pthread_mutexinit.c index a91a0339d..928a1e32a 100644 --- a/nuttx/sched/pthread_mutexinit.c +++ b/nuttx/sched/pthread_mutexinit.c @@ -89,7 +89,7 @@ int pthread_mutex_init(pthread_mutex_t *mutex, pthread_mutexattr_t *attr) int pshared = 0; int status; - dbg("mutex=0x%p attr=0x%p\n", mutex, attr); + sdbg("mutex=0x%p attr=0x%p\n", mutex, attr); if (!mutex) { @@ -117,6 +117,6 @@ int pthread_mutex_init(pthread_mutex_t *mutex, pthread_mutexattr_t *attr) } } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_mutexlock.c b/nuttx/sched/pthread_mutexlock.c index 64a663219..ef0893f12 100644 --- a/nuttx/sched/pthread_mutexlock.c +++ b/nuttx/sched/pthread_mutexlock.c @@ -90,7 +90,7 @@ int pthread_mutex_lock(pthread_mutex_t *mutex) int mypid = (int)getpid(); int ret = OK; - dbg("mutex=0x%p\n", mutex); + sdbg("mutex=0x%p\n", mutex); if (!mutex) { @@ -108,7 +108,7 @@ int pthread_mutex_lock(pthread_mutex_t *mutex) if (mutex->pid == mypid) { - dbg("Returning EDEADLK\n"); + sdbg("Returning EDEADLK\n"); ret = EDEADLK; } else @@ -129,7 +129,7 @@ int pthread_mutex_lock(pthread_mutex_t *mutex) sched_unlock(); } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_mutextrylock.c b/nuttx/sched/pthread_mutextrylock.c index 6474579a1..113f64eb8 100644 --- a/nuttx/sched/pthread_mutextrylock.c +++ b/nuttx/sched/pthread_mutextrylock.c @@ -90,7 +90,7 @@ int pthread_mutex_trylock(pthread_mutex_t *mutex) { int ret = OK; - dbg("mutex=0x%p\n", mutex); + sdbg("mutex=0x%p\n", mutex); if (!mutex) { @@ -129,7 +129,7 @@ int pthread_mutex_trylock(pthread_mutex_t *mutex) sched_unlock(); } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_mutexunlock.c b/nuttx/sched/pthread_mutexunlock.c index 2bc63eb26..d68cb6896 100644 --- a/nuttx/sched/pthread_mutexunlock.c +++ b/nuttx/sched/pthread_mutexunlock.c @@ -89,7 +89,7 @@ int pthread_mutex_unlock(pthread_mutex_t *mutex) { int ret = OK; - dbg("mutex=0x%p\n", mutex); + sdbg("mutex=0x%p\n", mutex); if (!mutex) { @@ -107,7 +107,7 @@ int pthread_mutex_unlock(pthread_mutex_t *mutex) if (mutex->pid != (int)getpid()) { - dbg("Holder=%d returning EPERM\n", mutex->pid); + sdbg("Holder=%d returning EPERM\n", mutex->pid); ret = EPERM; } else @@ -120,7 +120,7 @@ int pthread_mutex_unlock(pthread_mutex_t *mutex) sched_unlock(); } - dbg("Returning %d\n", ret); + sdbg("Returning %d\n", ret); return ret; } diff --git a/nuttx/sched/pthread_setschedparam.c b/nuttx/sched/pthread_setschedparam.c index 32e5326f1..4f6d1bb49 100644 --- a/nuttx/sched/pthread_setschedparam.c +++ b/nuttx/sched/pthread_setschedparam.c @@ -120,7 +120,7 @@ int pthread_setschedparam(pthread_t thread, int policy, { int ret; - dbg("thread ID=%d policy=%d param=0x%p\n", thread, policy, param); + sdbg("thread ID=%d policy=%d param=0x%p\n", thread, policy, param); /* Set the errno to some non-zero value (failsafe) */ diff --git a/nuttx/sched/sig_deliver.c b/nuttx/sched/sig_deliver.c index a2e8c9b5a..0a900c73d 100644 --- a/nuttx/sched/sig_deliver.c +++ b/nuttx/sched/sig_deliver.c @@ -103,7 +103,7 @@ void sig_deliver(FAR _TCB *stcb) for (sigq = (FAR sigq_t*)stcb->sigpendactionq.head; (sigq); sigq = next) { next = sigq->flink; - dbg("sig_deliver: Sending signal sigq=0x%x\n", sigq); + sdbg("Sending signal sigq=0x%x\n", sigq); /* Remove the signal structure from the sigpendactionq and place it * in the sigpostedq. NOTE: Since signals are processed one at a diff --git a/nuttx/sched/sig_kill.c b/nuttx/sched/sig_kill.c index 9e39a00e5..421fe7782 100644 --- a/nuttx/sched/sig_kill.c +++ b/nuttx/sched/sig_kill.c @@ -112,7 +112,7 @@ int kill(pid_t pid, int signo) /* Get the TCB of the receiving task */ stcb = sched_gettcb(pid); - dbg("TCB=0x%08x signo=%d\n", stcb, signo); + sdbg("TCB=0x%08x signo=%d\n", stcb, signo); if (!stcb) { *get_errno_ptr() = ESRCH; diff --git a/nuttx/sched/sig_mqnotempty.c b/nuttx/sched/sig_mqnotempty.c index a55d3138e..cfed1560c 100644 --- a/nuttx/sched/sig_mqnotempty.c +++ b/nuttx/sched/sig_mqnotempty.c @@ -98,9 +98,9 @@ int sig_mqnotempty (int pid, int signo, void *sival_ptr) stcb = sched_gettcb(pid); #ifdef CONFIG_CAN_PASS_STRUCTS - dbg("TCB=%p signo=%d value=%d\n", stcb, signo, value.sival_int); + sdbg("TCB=%p signo=%d value=%d\n", stcb, signo, value.sival_int); #else - dbg("TCB=%p signo=%d sival_ptr=%p\n", stcb, signo, sival_ptr); + sdbg("TCB=%p signo=%d sival_ptr=%p\n", stcb, signo, sival_ptr); #endif /* Create the siginfo structure */ diff --git a/nuttx/sched/sig_queue.c b/nuttx/sched/sig_queue.c index 835f2d2dd..0a0f558ec 100644 --- a/nuttx/sched/sig_queue.c +++ b/nuttx/sched/sig_queue.c @@ -131,9 +131,9 @@ int sigqueue(int pid, int signo, void *sival_ptr) stcb = sched_gettcb(pid); #ifdef CONFIG_CAN_PASS_STRUCTS - dbg("TCB=0x%08x signo=%d value=%d\n", stcb, signo, value.sival_int); + sdbg("TCB=0x%08x signo=%d value=%d\n", stcb, signo, value.sival_int); #else - dbg("TCB=0x%08x signo=%d value=%p\n", stcb, signo, sival_ptr); + sdbg("TCB=0x%08x signo=%d value=%p\n", stcb, signo, sival_ptr); #endif if (pid == 0 || !stcb) { diff --git a/nuttx/sched/sig_received.c b/nuttx/sched/sig_received.c index 5db0aa099..437f7a63c 100644 --- a/nuttx/sched/sig_received.c +++ b/nuttx/sched/sig_received.c @@ -289,8 +289,9 @@ int sig_received(FAR _TCB *stcb, siginfo_t *info) irqstate_t saved_state; int ret = ERROR; - dbg("sig_received: TCB=0x%08x signo=%d code=%d value=%d mask=%08x\n", - stcb, info->si_signo, info->si_code, info->si_value.sival_int, stcb->sigprocmask); + sdbg("TCB=0x%08x signo=%d code=%d value=%d mask=%08x\n", + stcb, info->si_signo, info->si_code, + info->si_value.sival_int, stcb->sigprocmask); if (stcb && info) { |