sched/: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition.
This commit is contained in:
parent
a1469a3e95
commit
13cac3b592
@ -62,7 +62,7 @@ int clock_getres(clockid_t clock_id, struct timespec *res)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
serr("clock_id=%d\n", clock_id);
|
||||
sinfo("clock_id=%d\n", clock_id);
|
||||
|
||||
/* Only CLOCK_REALTIME is supported */
|
||||
|
||||
@ -79,7 +79,7 @@ int clock_getres(clockid_t clock_id, struct timespec *res)
|
||||
res->tv_sec = 0;
|
||||
res->tv_nsec = NSEC_PER_TICK;
|
||||
|
||||
serr("Returning res=(%d,%d)\n", (int)res->tv_sec, (int)res->tv_nsec);
|
||||
sinfo("Returning res=(%d,%d)\n", (int)res->tv_sec, (int)res->tv_nsec);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -68,7 +68,7 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp)
|
||||
uint32_t carry;
|
||||
int ret = OK;
|
||||
|
||||
serr("clock_id=%d\n", clock_id);
|
||||
sinfo("clock_id=%d\n", clock_id);
|
||||
DEBUGASSERT(tp != NULL);
|
||||
|
||||
#ifdef CONFIG_CLOCK_MONOTONIC
|
||||
@ -155,7 +155,7 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp)
|
||||
}
|
||||
else
|
||||
{
|
||||
serr("Returning tp=(%d,%d)\n", (int)tp->tv_sec, (int)tp->tv_nsec);
|
||||
sinfo("Returning tp=(%d,%d)\n", (int)tp->tv_sec, (int)tp->tv_nsec);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -67,7 +67,7 @@ int clock_settime(clockid_t clock_id, FAR const struct timespec *tp)
|
||||
irqstate_t flags;
|
||||
int ret = OK;
|
||||
|
||||
serr("clock_id=%d\n", clock_id);
|
||||
sinfo("clock_id=%d\n", clock_id);
|
||||
DEBUGASSERT(tp != NULL);
|
||||
|
||||
/* CLOCK_REALTIME - POSIX demands this to be present. This is the wall
|
||||
@ -120,9 +120,9 @@ int clock_settime(clockid_t clock_id, FAR const struct timespec *tp)
|
||||
#endif
|
||||
leave_critical_section(flags);
|
||||
|
||||
serr("basetime=(%ld,%lu) bias=(%ld,%lu)\n",
|
||||
(long)g_basetime.tv_sec, (unsigned long)g_basetime.tv_nsec,
|
||||
(long)bias.tv_sec, (unsigned long)bias.tv_nsec);
|
||||
sinfo("basetime=(%ld,%lu) bias=(%ld,%lu)\n",
|
||||
(long)g_basetime.tv_sec, (unsigned long)g_basetime.tv_nsec,
|
||||
(long)bias.tv_sec, (unsigned long)bias.tv_nsec);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -66,7 +66,7 @@
|
||||
# define CONFIG_PREALLOC_CHILDSTATUS (2*CONFIG_MAX_TASKS)
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_DEBUG_FEATURES
|
||||
#ifndef CONFIG_DEBUG_INFO
|
||||
# undef CONFIG_DEBUG_CHILDSTATUS
|
||||
#endif
|
||||
|
||||
@ -115,11 +115,11 @@ static void group_dumpchildren(FAR struct task_group_s *group,
|
||||
FAR struct child_status_s *child;
|
||||
int i;
|
||||
|
||||
err("Task group=%p: %s\n", group, msg);
|
||||
info("Task group=%p: %s\n", group, msg);
|
||||
for (i = 0, child = group->tg_children; child; i++, child = child->flink)
|
||||
{
|
||||
err(" %d. ch_flags=%02x ch_pid=%d ch_status=%d\n",
|
||||
i, child->ch_flags, child->ch_pid, child->ch_status);
|
||||
info(" %d. ch_flags=%02x ch_pid=%d ch_status=%d\n",
|
||||
i, child->ch_flags, child->ch_pid, child->ch_status);
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
@ -120,13 +120,14 @@ int group_setupidlefiles(FAR struct task_tcb_s *tcb)
|
||||
|
||||
if (fd > 0)
|
||||
{
|
||||
sllerr("Open /dev/console fd: %d\n", fd);
|
||||
sllinfo("Open /dev/console fd: %d\n", fd);
|
||||
(void)close(fd);
|
||||
}
|
||||
else
|
||||
{
|
||||
sllerr("Failed to open /dev/console: %d\n", errno);
|
||||
sllerr("ERROR: Failed to open /dev/console: %d\n", errno);
|
||||
}
|
||||
|
||||
return -ENFILE;
|
||||
}
|
||||
#endif
|
||||
|
@ -133,7 +133,7 @@ int os_idle_task(int argc, FAR char *argv[])
|
||||
{
|
||||
/* Enter the IDLE loop */
|
||||
|
||||
serr("CPU%d: Beginning Idle Loop\n", this_cpu());
|
||||
sinfo("CPU%d: Beginning Idle Loop\n", this_cpu());
|
||||
|
||||
for (; ; )
|
||||
{
|
||||
|
@ -372,7 +372,7 @@ void os_start(void)
|
||||
#endif
|
||||
int i;
|
||||
|
||||
sllerr("Entry\n");
|
||||
sllinfo("Entry\n");
|
||||
|
||||
/* Boot up is complete */
|
||||
|
||||
@ -797,7 +797,7 @@ void os_start(void)
|
||||
/* The IDLE Loop **********************************************************/
|
||||
/* When control is return to this point, the system is idle. */
|
||||
|
||||
serr("CPU0: Beginning Idle Loop\n");
|
||||
sinfo("CPU0: Beginning Idle Loop\n");
|
||||
for (; ; )
|
||||
{
|
||||
/* Perform garbage collection (if it is not being done by the worker
|
||||
|
@ -61,7 +61,7 @@
|
||||
int irq_unexpected_isr(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
llerr("irq: %d\n", irq);
|
||||
llerr("ERROR irq: %d\n", irq);
|
||||
PANIC();
|
||||
return OK; /* Won't get here */
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ static inline int mod_readrel(FAR struct mod_loadinfo_s *loadinfo,
|
||||
|
||||
if (index < 0 || index > (relsec->sh_size / sizeof(Elf32_Rel)))
|
||||
{
|
||||
serr("Bad relocation symbol index: %d\n", index);
|
||||
serr("ERROR: Bad relocation symbol index: %d\n", index);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -125,7 +125,7 @@ static int mod_relocate(FAR struct mod_loadinfo_s *loadinfo, int relidx)
|
||||
ret = mod_readrel(loadinfo, relsec, i, &rel);
|
||||
if (ret < 0)
|
||||
{
|
||||
serr("Section %d reloc %d: Failed to read relocation entry: %d\n",
|
||||
serr("ERROR: Section %d reloc %d: Failed to read relocation entry: %d\n",
|
||||
relidx, i, ret);
|
||||
return ret;
|
||||
}
|
||||
@ -141,7 +141,7 @@ static int mod_relocate(FAR struct mod_loadinfo_s *loadinfo, int relidx)
|
||||
ret = mod_readsym(loadinfo, symidx, &sym);
|
||||
if (ret < 0)
|
||||
{
|
||||
serr("Section %d reloc %d: Failed to read symbol[%d]: %d\n",
|
||||
serr("ERROR: Section %d reloc %d: Failed to read symbol[%d]: %d\n",
|
||||
relidx, i, symidx, ret);
|
||||
return ret;
|
||||
}
|
||||
@ -163,13 +163,13 @@ static int mod_relocate(FAR struct mod_loadinfo_s *loadinfo, int relidx)
|
||||
|
||||
if (ret == -ESRCH)
|
||||
{
|
||||
serr("Section %d reloc %d: Undefined symbol[%d] has no name: %d\n",
|
||||
serr("ERROR: Section %d reloc %d: Undefined symbol[%d] has no name: %d\n",
|
||||
relidx, i, symidx, ret);
|
||||
psym = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
serr("Section %d reloc %d: Failed to get value of symbol[%d]: %d\n",
|
||||
serr("ERROR: Section %d reloc %d: Failed to get value of symbol[%d]: %d\n",
|
||||
relidx, i, symidx, ret);
|
||||
return ret;
|
||||
}
|
||||
@ -179,7 +179,7 @@ static int mod_relocate(FAR struct mod_loadinfo_s *loadinfo, int relidx)
|
||||
|
||||
if (rel.r_offset < 0 || rel.r_offset > dstsec->sh_size - sizeof(uint32_t))
|
||||
{
|
||||
serr("Section %d reloc %d: Relocation address out of range, offset %d size %d\n",
|
||||
serr("ERROR: Section %d reloc %d: Relocation address out of range, offset %d size %d\n",
|
||||
relidx, i, rel.r_offset, dstsec->sh_size);
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -201,7 +201,7 @@ static int mod_relocate(FAR struct mod_loadinfo_s *loadinfo, int relidx)
|
||||
|
||||
static int mod_relocateadd(FAR struct mod_loadinfo_s *loadinfo, int relidx)
|
||||
{
|
||||
serr("Not implemented\n");
|
||||
serr("ERROR: Not implemented\n");
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
@ -242,7 +242,7 @@ int mod_bind(FAR struct mod_loadinfo_s *loadinfo)
|
||||
ret = mod_allocbuffer(loadinfo);
|
||||
if (ret < 0)
|
||||
{
|
||||
serr("mod_allocbuffer failed: %d\n", ret);
|
||||
serr("ERROR: mod_allocbuffer failed: %d\n", ret);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ static inline int mod_filelen(FAR struct mod_loadinfo_s *loadinfo,
|
||||
if (ret < 0)
|
||||
{
|
||||
int errval = errno;
|
||||
serr("Failed to stat file: %d\n", errval);
|
||||
serr("ERROR: Failed to stat file: %d\n", errval);
|
||||
return -errval;
|
||||
}
|
||||
|
||||
@ -110,7 +110,7 @@ static inline int mod_filelen(FAR struct mod_loadinfo_s *loadinfo,
|
||||
|
||||
if (!S_ISREG(buf.st_mode))
|
||||
{
|
||||
serr("Not a regular file. mode: %d\n", buf.st_mode);
|
||||
serr("ERROR: Not a regular file. mode: %d\n", buf.st_mode);
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
@ -157,7 +157,7 @@ int mod_initialize(FAR const char *filename,
|
||||
ret = mod_filelen(loadinfo, filename);
|
||||
if (ret < 0)
|
||||
{
|
||||
serr("mod_filelen failed: %d\n", ret);
|
||||
serr("ERROR: mod_filelen failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -167,7 +167,7 @@ int mod_initialize(FAR const char *filename,
|
||||
if (loadinfo->filfd < 0)
|
||||
{
|
||||
int errval = errno;
|
||||
serr("Failed to open ELF binary %s: %d\n", filename, errval);
|
||||
serr("ERROR: Failed to open ELF binary %s: %d\n", filename, errval);
|
||||
return -errval;
|
||||
}
|
||||
|
||||
@ -177,7 +177,7 @@ int mod_initialize(FAR const char *filename,
|
||||
sizeof(Elf32_Ehdr), 0);
|
||||
if (ret < 0)
|
||||
{
|
||||
serr("Failed to read ELF header: %d\n", ret);
|
||||
serr("ERROR: Failed to read ELF header: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -196,7 +196,7 @@ int mod_initialize(FAR const char *filename,
|
||||
* is not correctly formed.
|
||||
*/
|
||||
|
||||
serr("Bad ELF header: %d\n", ret);
|
||||
serr("ERROR: Bad ELF header: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -58,8 +58,8 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_BINFMT have to be
|
||||
* defined or CONFIG_MODULE_DUMPBUFFER does nothing.
|
||||
/* CONFIG_DEBUG_INFO, and CONFIG_DEBUG_BINFMT have to be defined or
|
||||
* CONFIG_MODULE_DUMPBUFFER does nothing.
|
||||
*/
|
||||
|
||||
#if !defined(CONFIG_DEBUG_INFO) || !defined (CONFIG_DEBUG_BINFMT)
|
||||
@ -84,55 +84,55 @@
|
||||
* Name: mod_dumploadinfo
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_BINFMT)
|
||||
#if defined(CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_BINFMT)
|
||||
static void mod_dumploadinfo(FAR struct mod_loadinfo_s *loadinfo)
|
||||
{
|
||||
int i;
|
||||
|
||||
serr("LOAD_INFO:\n");
|
||||
serr(" textalloc: %08lx\n", (long)loadinfo->textalloc);
|
||||
serr(" datastart: %08lx\n", (long)loadinfo->datastart);
|
||||
serr(" textsize: %ld\n", (long)loadinfo->textsize);
|
||||
serr(" datasize: %ld\n", (long)loadinfo->datasize);
|
||||
serr(" filelen: %ld\n", (long)loadinfo->filelen);
|
||||
serr(" filfd: %d\n", loadinfo->filfd);
|
||||
serr(" symtabidx: %d\n", loadinfo->symtabidx);
|
||||
serr(" strtabidx: %d\n", loadinfo->strtabidx);
|
||||
sinfo("LOAD_INFO:\n");
|
||||
sinfo(" textalloc: %08lx\n", (long)loadinfo->textalloc);
|
||||
sinfo(" datastart: %08lx\n", (long)loadinfo->datastart);
|
||||
sinfo(" textsize: %ld\n", (long)loadinfo->textsize);
|
||||
sinfo(" datasize: %ld\n", (long)loadinfo->datasize);
|
||||
sinfo(" filelen: %ld\n", (long)loadinfo->filelen);
|
||||
sinfo(" filfd: %d\n", loadinfo->filfd);
|
||||
sinfo(" symtabidx: %d\n", loadinfo->symtabidx);
|
||||
sinfo(" strtabidx: %d\n", loadinfo->strtabidx);
|
||||
|
||||
serr("ELF Header:\n");
|
||||
serr(" e_ident: %02x %02x %02x %02x\n",
|
||||
sinfo("ELF Header:\n");
|
||||
sinfo(" e_ident: %02x %02x %02x %02x\n",
|
||||
loadinfo->ehdr.e_ident[0], loadinfo->ehdr.e_ident[1],
|
||||
loadinfo->ehdr.e_ident[2], loadinfo->ehdr.e_ident[3]);
|
||||
serr(" e_type: %04x\n", loadinfo->ehdr.e_type);
|
||||
serr(" e_machine: %04x\n", loadinfo->ehdr.e_machine);
|
||||
serr(" e_version: %08x\n", loadinfo->ehdr.e_version);
|
||||
serr(" e_entry: %08lx\n", (long)loadinfo->ehdr.e_entry);
|
||||
serr(" e_phoff: %d\n", loadinfo->ehdr.e_phoff);
|
||||
serr(" e_shoff: %d\n", loadinfo->ehdr.e_shoff);
|
||||
serr(" e_flags: %08x\n" , loadinfo->ehdr.e_flags);
|
||||
serr(" e_ehsize: %d\n", loadinfo->ehdr.e_ehsize);
|
||||
serr(" e_phentsize: %d\n", loadinfo->ehdr.e_phentsize);
|
||||
serr(" e_phnum: %d\n", loadinfo->ehdr.e_phnum);
|
||||
serr(" e_shentsize: %d\n", loadinfo->ehdr.e_shentsize);
|
||||
serr(" e_shnum: %d\n", loadinfo->ehdr.e_shnum);
|
||||
serr(" e_shstrndx: %d\n", loadinfo->ehdr.e_shstrndx);
|
||||
sinfo(" e_type: %04x\n", loadinfo->ehdr.e_type);
|
||||
sinfo(" e_machine: %04x\n", loadinfo->ehdr.e_machine);
|
||||
sinfo(" e_version: %08x\n", loadinfo->ehdr.e_version);
|
||||
sinfo(" e_entry: %08lx\n", (long)loadinfo->ehdr.e_entry);
|
||||
sinfo(" e_phoff: %d\n", loadinfo->ehdr.e_phoff);
|
||||
sinfo(" e_shoff: %d\n", loadinfo->ehdr.e_shoff);
|
||||
sinfo(" e_flags: %08x\n" , loadinfo->ehdr.e_flags);
|
||||
sinfo(" e_ehsize: %d\n", loadinfo->ehdr.e_ehsize);
|
||||
sinfo(" e_phentsize: %d\n", loadinfo->ehdr.e_phentsize);
|
||||
sinfo(" e_phnum: %d\n", loadinfo->ehdr.e_phnum);
|
||||
sinfo(" e_shentsize: %d\n", loadinfo->ehdr.e_shentsize);
|
||||
sinfo(" e_shnum: %d\n", loadinfo->ehdr.e_shnum);
|
||||
sinfo(" e_shstrndx: %d\n", loadinfo->ehdr.e_shstrndx);
|
||||
|
||||
if (loadinfo->shdr && loadinfo->ehdr.e_shnum > 0)
|
||||
{
|
||||
for (i = 0; i < loadinfo->ehdr.e_shnum; i++)
|
||||
{
|
||||
FAR Elf32_Shdr *shdr = &loadinfo->shdr[i];
|
||||
serr("Sections %d:\n", i);
|
||||
serr(" sh_name: %08x\n", shdr->sh_name);
|
||||
serr(" sh_type: %08x\n", shdr->sh_type);
|
||||
serr(" sh_flags: %08x\n", shdr->sh_flags);
|
||||
serr(" sh_addr: %08x\n", shdr->sh_addr);
|
||||
serr(" sh_offset: %d\n", shdr->sh_offset);
|
||||
serr(" sh_size: %d\n", shdr->sh_size);
|
||||
serr(" sh_link: %d\n", shdr->sh_link);
|
||||
serr(" sh_info: %d\n", shdr->sh_info);
|
||||
serr(" sh_addralign: %d\n", shdr->sh_addralign);
|
||||
serr(" sh_entsize: %d\n", shdr->sh_entsize);
|
||||
sinfo("Sections %d:\n", i);
|
||||
sinfo(" sh_name: %08x\n", shdr->sh_name);
|
||||
sinfo(" sh_type: %08x\n", shdr->sh_type);
|
||||
sinfo(" sh_flags: %08x\n", shdr->sh_flags);
|
||||
sinfo(" sh_addr: %08x\n", shdr->sh_addr);
|
||||
sinfo(" sh_offset: %d\n", shdr->sh_offset);
|
||||
sinfo(" sh_size: %d\n", shdr->sh_size);
|
||||
sinfo(" sh_link: %d\n", shdr->sh_link);
|
||||
sinfo(" sh_info: %d\n", shdr->sh_info);
|
||||
sinfo(" sh_addralign: %d\n", shdr->sh_addralign);
|
||||
sinfo(" sh_entsize: %d\n", shdr->sh_entsize);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -212,7 +212,7 @@ int insmod(FAR const char *filename, FAR const char *modulename)
|
||||
mod_dumploadinfo(&loadinfo);
|
||||
if (ret != 0)
|
||||
{
|
||||
serr("ERROR: Failed to initialize to load module: %d\n", ret);
|
||||
sinfo("ERROR: Failed to initialize to load module: %d\n", ret);
|
||||
goto errout_with_lock;
|
||||
}
|
||||
|
||||
@ -221,7 +221,7 @@ int insmod(FAR const char *filename, FAR const char *modulename)
|
||||
modp = (FAR struct module_s *)kmm_zalloc(sizeof(struct module_s));
|
||||
if (ret != 0)
|
||||
{
|
||||
serr("Failed to initialize for load of ELF program: %d\n", ret);
|
||||
sinfo("Failed to initialize for load of ELF program: %d\n", ret);
|
||||
goto errout_with_loadinfo;
|
||||
}
|
||||
|
||||
@ -235,7 +235,7 @@ int insmod(FAR const char *filename, FAR const char *modulename)
|
||||
mod_dumploadinfo(&loadinfo);
|
||||
if (ret != 0)
|
||||
{
|
||||
serr("Failed to load ELF program binary: %d\n", ret);
|
||||
sinfo("Failed to load ELF program binary: %d\n", ret);
|
||||
goto errout_with_registry_entry;
|
||||
}
|
||||
|
||||
@ -244,7 +244,7 @@ int insmod(FAR const char *filename, FAR const char *modulename)
|
||||
ret = mod_bind(&loadinfo);
|
||||
if (ret != 0)
|
||||
{
|
||||
serr("Failed to bind symbols program binary: %d\n", ret);
|
||||
sinfo("Failed to bind symbols program binary: %d\n", ret);
|
||||
goto errout_with_load;
|
||||
}
|
||||
|
||||
@ -269,7 +269,7 @@ int insmod(FAR const char *filename, FAR const char *modulename)
|
||||
ret = initializer(&modp->uninitializer, &modp->arg);
|
||||
if (ret < 0)
|
||||
{
|
||||
serr("Failed to initialize the module: %d\n", ret);
|
||||
sinfo("Failed to initialize the module: %d\n", ret);
|
||||
goto errout_with_load;
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ int mod_allocbuffer(FAR struct mod_loadinfo_s *loadinfo)
|
||||
loadinfo->iobuffer = (FAR uint8_t *)kmm_malloc(CONFIG_MODULE_BUFFERSIZE);
|
||||
if (!loadinfo->iobuffer)
|
||||
{
|
||||
serr("Failed to allocate an I/O buffer\n");
|
||||
serr("ERROR: Failed to allocate an I/O buffer\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ int mod_reallocbuffer(FAR struct mod_loadinfo_s *loadinfo, size_t increment)
|
||||
buffer = kmm_realloc((FAR void *)loadinfo->iobuffer, newsize);
|
||||
if (!buffer)
|
||||
{
|
||||
serr("Failed to reallocate the I/O buffer\n");
|
||||
serr("ERROR: Failed to reallocate the I/O buffer\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ int mod_read(FAR struct mod_loadinfo_s *loadinfo, FAR uint8_t *buffer,
|
||||
if (rpos != offset)
|
||||
{
|
||||
int errval = errno;
|
||||
serr("Failed to seek to position %lu: %d\n",
|
||||
serr("ERROR: Failed to seek to position %lu: %d\n",
|
||||
(unsigned long)offset, errval);
|
||||
return -errval;
|
||||
}
|
||||
@ -142,14 +142,14 @@ int mod_read(FAR struct mod_loadinfo_s *loadinfo, FAR uint8_t *buffer,
|
||||
|
||||
if (errval != EINTR)
|
||||
{
|
||||
serr("Read from offset %lu failed: %d\n",
|
||||
serr("ERROR: Read from offset %lu failed: %d\n",
|
||||
(unsigned long)offset, errval);
|
||||
return -errval;
|
||||
}
|
||||
}
|
||||
else if (nbytes == 0)
|
||||
{
|
||||
serr("Unexpected end of file\n");
|
||||
serr("ERROR: Unexpected end of file\n");
|
||||
return -ENODATA;
|
||||
}
|
||||
else
|
||||
|
@ -85,7 +85,7 @@ static inline int mod_sectname(FAR struct mod_loadinfo_s *loadinfo,
|
||||
shstrndx = loadinfo->ehdr.e_shstrndx;
|
||||
if (shstrndx == SHN_UNDEF)
|
||||
{
|
||||
serr("No section header string table\n");
|
||||
serr("ERROR: No section header string table\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -118,7 +118,7 @@ static inline int mod_sectname(FAR struct mod_loadinfo_s *loadinfo,
|
||||
{
|
||||
if (loadinfo->filelen <= offset)
|
||||
{
|
||||
serr("At end of file\n");
|
||||
serr("ERROR: At end of file\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ static inline int mod_sectname(FAR struct mod_loadinfo_s *loadinfo,
|
||||
ret = mod_read(loadinfo, buffer, readlen, offset);
|
||||
if (ret < 0)
|
||||
{
|
||||
serr("Failed to read section name\n");
|
||||
serr("ERROR: Failed to read section name: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -151,7 +151,7 @@ static inline int mod_sectname(FAR struct mod_loadinfo_s *loadinfo,
|
||||
ret = mod_reallocbuffer(loadinfo, CONFIG_MODULE_BUFFERINCR);
|
||||
if (ret < 0)
|
||||
{
|
||||
serr("mod_reallocbuffer failed: %d\n", ret);
|
||||
serr("ERROR: mod_reallocbuffer failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
@ -188,7 +188,7 @@ int mod_loadshdrs(FAR struct mod_loadinfo_s *loadinfo)
|
||||
|
||||
if (loadinfo->ehdr.e_shnum < 1)
|
||||
{
|
||||
serr("No sections(?)\n");
|
||||
serr("ERROR: No sections(?)\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -197,7 +197,7 @@ int mod_loadshdrs(FAR struct mod_loadinfo_s *loadinfo)
|
||||
shdrsize = (size_t)loadinfo->ehdr.e_shentsize * (size_t)loadinfo->ehdr.e_shnum;
|
||||
if (loadinfo->ehdr.e_shoff + shdrsize > loadinfo->filelen)
|
||||
{
|
||||
serr("Insufficent space in file for section header table\n");
|
||||
serr("ERROR: Insufficent space in file for section header table\n");
|
||||
return -ESPIPE;
|
||||
}
|
||||
|
||||
@ -206,7 +206,7 @@ int mod_loadshdrs(FAR struct mod_loadinfo_s *loadinfo)
|
||||
loadinfo->shdr = (FAR FAR Elf32_Shdr *)kmm_malloc(shdrsize);
|
||||
if (!loadinfo->shdr)
|
||||
{
|
||||
serr("Failed to allocate the section header table. Size: %ld\n",
|
||||
serr("ERROR: Failed to allocate the section header table. Size: %ld\n",
|
||||
(long)shdrsize);
|
||||
return -ENOMEM;
|
||||
}
|
||||
@ -217,7 +217,7 @@ int mod_loadshdrs(FAR struct mod_loadinfo_s *loadinfo)
|
||||
loadinfo->ehdr.e_shoff);
|
||||
if (ret < 0)
|
||||
{
|
||||
serr("Failed to read section header table: %d\n", ret);
|
||||
serr("ERROR: Failed to read section header table: %d\n", ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@ -256,7 +256,7 @@ int mod_findsection(FAR struct mod_loadinfo_s *loadinfo,
|
||||
ret = mod_sectname(loadinfo, shdr);
|
||||
if (ret < 0)
|
||||
{
|
||||
serr("mod_sectname failed: %d\n", ret);
|
||||
serr("ERROR: mod_sectname failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ static int mod_symname(FAR struct mod_loadinfo_s *loadinfo,
|
||||
|
||||
if (sym->st_name == 0)
|
||||
{
|
||||
serr("Symbol has no name\n");
|
||||
serr("ERROR: Symbol has no name\n");
|
||||
return -ESRCH;
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ static int mod_symname(FAR struct mod_loadinfo_s *loadinfo,
|
||||
{
|
||||
if (loadinfo->filelen <= offset)
|
||||
{
|
||||
serr("At end of file\n");
|
||||
serr("ERROR: At end of file\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -125,7 +125,7 @@ static int mod_symname(FAR struct mod_loadinfo_s *loadinfo,
|
||||
ret = mod_read(loadinfo, buffer, readlen, offset);
|
||||
if (ret < 0)
|
||||
{
|
||||
serr("mod_read failed: %d\n", ret);
|
||||
serr("ERROR: mod_read failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -145,7 +145,7 @@ static int mod_symname(FAR struct mod_loadinfo_s *loadinfo,
|
||||
ret = mod_reallocbuffer(loadinfo, CONFIG_MODULE_BUFFERINCR);
|
||||
if (ret < 0)
|
||||
{
|
||||
serr("mod_reallocbuffer failed: %d\n", ret);
|
||||
serr("ERROR: mod_reallocbuffer failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
@ -191,7 +191,7 @@ int mod_findsymtab(FAR struct mod_loadinfo_s *loadinfo)
|
||||
|
||||
if (loadinfo->symtabidx == 0)
|
||||
{
|
||||
serr("No symbols in ELF file\n");
|
||||
serr("ERROR: No symbols in ELF file\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -225,7 +225,7 @@ int mod_readsym(FAR struct mod_loadinfo_s *loadinfo, int index,
|
||||
|
||||
if (index < 0 || index > (symtab->sh_size / sizeof(Elf32_Sym)))
|
||||
{
|
||||
serr("Bad relocation symbol index: %d\n", index);
|
||||
serr("ERROR: Bad relocation symbol index: %d\n", index);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -273,7 +273,7 @@ int mod_symvalue(FAR struct mod_loadinfo_s *loadinfo, FAR Elf32_Sym *sym)
|
||||
{
|
||||
/* NuttX ELF modules should be compiled with -fno-common. */
|
||||
|
||||
serr("SHN_COMMON: Re-compile with -fno-common\n");
|
||||
serr("ERROR: SHN_COMMON: Re-compile with -fno-common\n");
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
@ -298,7 +298,7 @@ int mod_symvalue(FAR struct mod_loadinfo_s *loadinfo, FAR Elf32_Sym *sym)
|
||||
* indicate the nameless symbol.
|
||||
*/
|
||||
|
||||
serr("SHN_UNDEF: Failed to get symbol name: %d\n", ret);
|
||||
serr("ERROR: SHN_UNDEF: Failed to get symbol name: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -315,7 +315,8 @@ int mod_symvalue(FAR struct mod_loadinfo_s *loadinfo, FAR Elf32_Sym *sym)
|
||||
#endif
|
||||
if (!symbol)
|
||||
{
|
||||
serr("SHN_UNDEF: Exported symbol \"%s\" not found\n", loadinfo->iobuffer);
|
||||
serr("ERROR: SHN_UNDEF: Exported symbol \"%s\" not found\n",
|
||||
loadinfo->iobuffer);
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ int mod_verifyheader(FAR const Elf32_Ehdr *ehdr)
|
||||
{
|
||||
if (!ehdr)
|
||||
{
|
||||
serr("NULL ELF header!");
|
||||
serr("ERROR: NULL ELF header!");
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ int mod_verifyheader(FAR const Elf32_Ehdr *ehdr)
|
||||
|
||||
if (ehdr->e_type != ET_REL)
|
||||
{
|
||||
serr("Not a relocatable file: e_type=%d\n", ehdr->e_type);
|
||||
serr("ERROR: Not a relocatable file: e_type=%d\n", ehdr->e_type);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ int mod_verifyheader(FAR const Elf32_Ehdr *ehdr)
|
||||
|
||||
if (up_checkarch(ehdr))
|
||||
{
|
||||
serr("Not a supported architecture\n");
|
||||
serr("ERROR: Not a supported architecture\n");
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ void pg_miss(void)
|
||||
* always present in memory.
|
||||
*/
|
||||
|
||||
pgllerr("Blocking TCB: %p PID: %d\n", ftcb, ftcb->pid);
|
||||
pgllinfo("Blocking TCB: %p PID: %d\n", ftcb, ftcb->pid);
|
||||
DEBUGASSERT(g_pgworker != ftcb->pid);
|
||||
|
||||
/* Block the currently executing task
|
||||
@ -171,7 +171,7 @@ void pg_miss(void)
|
||||
|
||||
if (!g_pftcb)
|
||||
{
|
||||
pgllerr("Signaling worker. PID: %d\n", g_pgworker);
|
||||
pgllinfo("Signaling worker. PID: %d\n", g_pgworker);
|
||||
kill(g_pgworker, SIGWORK);
|
||||
}
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ static void pg_callback(FAR struct tcb_s *tcb, int result)
|
||||
|
||||
/* Signal the page fill worker thread (in any event) */
|
||||
|
||||
pgllerr("Signaling worker. PID: %d\n", g_pgworker);
|
||||
pgllinfo("Signaling worker. PID: %d\n", g_pgworker);
|
||||
kill(g_pgworker, SIGWORK);
|
||||
}
|
||||
#endif
|
||||
@ -308,7 +308,7 @@ static inline bool pg_dequeue(void)
|
||||
* virtual address space -- just restart it.
|
||||
*/
|
||||
|
||||
pgllerr("Restarting TCB: %p\n", g_pftcb);
|
||||
pgllinfo("Restarting TCB: %p\n", g_pftcb);
|
||||
up_unblock_task(g_pftcb);
|
||||
}
|
||||
}
|
||||
@ -422,7 +422,7 @@ static inline bool pg_startfill(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
pgllerr("Queue empty\n");
|
||||
pgllinfo("Queue empty\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -490,7 +490,7 @@ static inline void pg_fillcomplete(void)
|
||||
* received the fill ready-to-run.
|
||||
*/
|
||||
|
||||
pgllerr("Restarting TCB: %p\n", g_pftcb);
|
||||
pgllinfo("Restarting TCB: %p\n", g_pftcb);
|
||||
up_unblock_task(g_pftcb);
|
||||
}
|
||||
|
||||
@ -532,7 +532,7 @@ int pg_worker(int argc, char *argv[])
|
||||
* fill completions should occur while this thread sleeps.
|
||||
*/
|
||||
|
||||
pgllerr("Started\n");
|
||||
pgllinfo("Started\n");
|
||||
(void)up_irq_save();
|
||||
for (; ; )
|
||||
{
|
||||
@ -580,7 +580,7 @@ int pg_worker(int argc, char *argv[])
|
||||
* task that was blocked waiting for this page fill.
|
||||
*/
|
||||
|
||||
pgllerr("Restarting TCB: %p\n", g_pftcb);
|
||||
pgllinfo("Restarting TCB: %p\n", g_pftcb);
|
||||
up_unblock_task(g_pftcb);
|
||||
|
||||
/* Yes .. Start the next asynchronous fill. Check the return
|
||||
@ -608,7 +608,7 @@ int pg_worker(int argc, char *argv[])
|
||||
#ifdef CONFIG_PAGING_TIMEOUT_TICKS
|
||||
else
|
||||
{
|
||||
llerr("Timeout!\n");
|
||||
pgllerr("ERROR: Timeout!\n");
|
||||
ASSERT(clock_systimer() - g_starttime < CONFIG_PAGING_TIMEOUT_TICKS);
|
||||
}
|
||||
#endif
|
||||
|
@ -214,7 +214,7 @@ int pthread_completejoin(pid_t pid, FAR void *exit_value)
|
||||
pjoin = pthread_findjoininfo(group, pid);
|
||||
if (!pjoin)
|
||||
{
|
||||
serr("Could not find join info, pid=%d\n", pid);
|
||||
serr("ERROR: Could not find join info, pid=%d\n", pid);
|
||||
(void)pthread_givesemaphore(&group->tg_joinsem);
|
||||
return ERROR;
|
||||
}
|
||||
@ -271,7 +271,7 @@ int pthread_completejoin(pid_t pid, FAR void *exit_value)
|
||||
void pthread_destroyjoin(FAR struct task_group_s *group,
|
||||
FAR struct join_s *pjoin)
|
||||
{
|
||||
serr("pjoin=0x%p\n", pjoin);
|
||||
sinfo("pjoin=0x%p\n", pjoin);
|
||||
|
||||
/* Remove the join info from the set of joins */
|
||||
|
||||
|
@ -71,7 +71,7 @@ int pthread_cond_broadcast(FAR pthread_cond_t *cond)
|
||||
int ret = OK;
|
||||
int sval;
|
||||
|
||||
serr("cond=0x%p\n", cond);
|
||||
sinfo("cond=0x%p\n", cond);
|
||||
|
||||
if (!cond)
|
||||
{
|
||||
@ -118,7 +118,7 @@ int pthread_cond_broadcast(FAR pthread_cond_t *cond)
|
||||
sched_unlock();
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
sinfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ int pthread_cond_destroy(FAR pthread_cond_t *cond)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
serr("cond=0x%p\n", cond);
|
||||
sinfo("cond=0x%p\n", cond);
|
||||
|
||||
if (!cond)
|
||||
{
|
||||
@ -82,7 +82,7 @@ int pthread_cond_destroy(FAR pthread_cond_t *cond)
|
||||
ret = EINVAL;
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
sinfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ int pthread_cond_init(FAR pthread_cond_t *cond, FAR const pthread_condattr_t *at
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
serr("cond=0x%p attr=0x%p\n", cond, attr);
|
||||
sinfo("cond=0x%p attr=0x%p\n", cond, attr);
|
||||
|
||||
if (!cond)
|
||||
{
|
||||
@ -85,7 +85,7 @@ int pthread_cond_init(FAR pthread_cond_t *cond, FAR const pthread_condattr_t *at
|
||||
ret = EINVAL;
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
sinfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ int pthread_cond_signal(FAR pthread_cond_t *cond)
|
||||
int ret = OK;
|
||||
int sval;
|
||||
|
||||
serr("cond=0x%p\n", cond);
|
||||
sinfo("cond=0x%p\n", cond);
|
||||
|
||||
if (!cond)
|
||||
{
|
||||
@ -101,16 +101,16 @@ int pthread_cond_signal(FAR pthread_cond_t *cond)
|
||||
* operation that will guarantee this to be so.
|
||||
*/
|
||||
|
||||
serr("sval=%d\n", sval);
|
||||
sinfo("sval=%d\n", sval);
|
||||
if (sval < 0)
|
||||
{
|
||||
serr("Signalling...\n");
|
||||
sinfo("Signalling...\n");
|
||||
ret = pthread_givesemaphore((FAR sem_t *)&cond->sem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
sinfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ int pthread_cond_timedwait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex,
|
||||
int ret = OK;
|
||||
int status;
|
||||
|
||||
serr("cond=0x%p mutex=0x%p abstime=0x%p\n", cond, mutex, abstime);
|
||||
sinfo("cond=0x%p mutex=0x%p abstime=0x%p\n", cond, mutex, abstime);
|
||||
|
||||
DEBUGASSERT(rtcb->waitdog == NULL);
|
||||
|
||||
@ -212,7 +212,7 @@ int pthread_cond_timedwait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex,
|
||||
}
|
||||
else
|
||||
{
|
||||
serr("Give up mutex...\n");
|
||||
sinfo("Give up mutex...\n");
|
||||
|
||||
/* We must disable pre-emption and interrupts here so that
|
||||
* the time stays valid until the wait begins. This adds
|
||||
@ -292,7 +292,7 @@ int pthread_cond_timedwait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex,
|
||||
|
||||
if (get_errno() == EINTR)
|
||||
{
|
||||
serr("Timedout!\n");
|
||||
serr("ERROR: Timedout!\n");
|
||||
ret = ETIMEDOUT;
|
||||
}
|
||||
else
|
||||
@ -312,7 +312,7 @@ int pthread_cond_timedwait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex,
|
||||
|
||||
/* Reacquire the mutex (retaining the ret). */
|
||||
|
||||
serr("Re-locking...\n");
|
||||
sinfo("Re-locking...\n");
|
||||
status = pthread_takesemaphore((FAR sem_t *)&mutex->sem);
|
||||
if (!status)
|
||||
{
|
||||
@ -338,7 +338,7 @@ int pthread_cond_timedwait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex,
|
||||
}
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
sinfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex)
|
||||
{
|
||||
int ret;
|
||||
|
||||
serr("cond=0x%p mutex=0x%p\n", cond, mutex);
|
||||
sinfo("cond=0x%p mutex=0x%p\n", cond, mutex);
|
||||
|
||||
/* Make sure that non-NULL references were provided. */
|
||||
|
||||
@ -90,7 +90,7 @@ int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex)
|
||||
{
|
||||
/* Give up the mutex */
|
||||
|
||||
serr("Give up mutex / take cond\n");
|
||||
sinfo("Give up mutex / take cond\n");
|
||||
|
||||
sched_lock();
|
||||
mutex->pid = -1;
|
||||
@ -103,7 +103,7 @@ int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex)
|
||||
|
||||
/* Reacquire the mutex */
|
||||
|
||||
serr("Reacquire mutex...\n");
|
||||
sinfo("Reacquire mutex...\n");
|
||||
ret |= pthread_takesemaphore((FAR sem_t *)&mutex->sem);
|
||||
if (!ret)
|
||||
{
|
||||
@ -111,7 +111,7 @@ int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex)
|
||||
}
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
sinfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ int pthread_detach(pthread_t thread)
|
||||
FAR struct join_s *pjoin;
|
||||
int ret;
|
||||
|
||||
serr("Thread=%d group=%p\n", thread, group);
|
||||
sinfo("Thread=%d group=%p\n", thread, group);
|
||||
DEBUGASSERT(group);
|
||||
|
||||
/* Find the entry associated with this pthread. */
|
||||
@ -91,7 +91,7 @@ int pthread_detach(pthread_t thread)
|
||||
pjoin = pthread_findjoininfo(group, (pid_t)thread);
|
||||
if (!pjoin)
|
||||
{
|
||||
serr("Could not find thread entry\n");
|
||||
serr("ERROR: Could not find thread entry\n");
|
||||
ret = EINVAL;
|
||||
}
|
||||
else
|
||||
@ -121,6 +121,6 @@ int pthread_detach(pthread_t thread)
|
||||
|
||||
(void)pthread_givesemaphore(&group->tg_joinsem);
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
sinfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ void pthread_exit(FAR void *exit_value)
|
||||
FAR struct tcb_s *tcb = this_task();
|
||||
int status;
|
||||
|
||||
serr("exit_value=%p\n", exit_value);
|
||||
sinfo("exit_value=%p\n", exit_value);
|
||||
|
||||
/* Block any signal actions that would awaken us while were
|
||||
* are performing the JOIN handshake.
|
||||
|
@ -80,8 +80,8 @@ int pthread_getaffinity_np(pthread_t thread, size_t cpusetsize,
|
||||
{
|
||||
int ret;
|
||||
|
||||
serr("thread ID=%d cpusetsize=%d cpuset=%p\n",
|
||||
(int)thread, (int)cpusetsize, cpusetsize);
|
||||
sinfo("thread ID=%d cpusetsize=%d cpuset=%p\n",
|
||||
(int)thread, (int)cpusetsize, cpusetsize);
|
||||
|
||||
DEBUGASSERT(thread > 0 && cpusetsize == sizeof(cpu_set_t) &&
|
||||
cpuset != NULL);
|
||||
|
@ -88,7 +88,7 @@ int pthread_getschedparam(pthread_t thread, FAR int *policy,
|
||||
{
|
||||
int ret;
|
||||
|
||||
serr("Thread ID=%d policy=0x%p param=0x%p\n", thread, policy, param);
|
||||
sinfo("Thread ID=%d policy=0x%p param=0x%p\n", thread, policy, param);
|
||||
|
||||
if (!policy || !param)
|
||||
{
|
||||
@ -113,7 +113,7 @@ int pthread_getschedparam(pthread_t thread, FAR int *policy,
|
||||
}
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
sinfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ int pthread_join(pthread_t thread, FAR pthread_addr_t *pexit_value)
|
||||
FAR struct join_s *pjoin;
|
||||
int ret;
|
||||
|
||||
serr("thread=%d group=%p\n", thread, group);
|
||||
sinfo("thread=%d group=%p\n", thread, group);
|
||||
DEBUGASSERT(group);
|
||||
|
||||
/* First make sure that this is not an attempt to join to
|
||||
@ -121,7 +121,7 @@ int pthread_join(pthread_t thread, FAR pthread_addr_t *pexit_value)
|
||||
|
||||
FAR struct tcb_s *tcb = sched_gettcb((pthread_t)thread);
|
||||
|
||||
serr("Could not find thread data\n");
|
||||
serr("ERROR: Could not find thread data\n");
|
||||
|
||||
/* Case (1) or (3) -- we can't tell which. Assume (3) */
|
||||
|
||||
@ -159,19 +159,19 @@ int pthread_join(pthread_t thread, FAR pthread_addr_t *pexit_value)
|
||||
|
||||
if (pjoin->terminated)
|
||||
{
|
||||
serr("Thread has terminated\n");
|
||||
sinfo("Thread has terminated\n");
|
||||
|
||||
/* Get the thread exit value from the terminated thread. */
|
||||
|
||||
if (pexit_value)
|
||||
{
|
||||
serr("exit_value=0x%p\n", pjoin->exit_value);
|
||||
sinfo("exit_value=0x%p\n", pjoin->exit_value);
|
||||
*pexit_value = pjoin->exit_value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
serr("Thread is still running\n");
|
||||
sinfo("Thread is still running\n");
|
||||
|
||||
/* Relinquish the data set semaphore. Since pre-emption is
|
||||
* disabled, we can be certain that no task has the
|
||||
@ -195,7 +195,7 @@ int pthread_join(pthread_t thread, FAR pthread_addr_t *pexit_value)
|
||||
if (pexit_value)
|
||||
{
|
||||
*pexit_value = pjoin->exit_value;
|
||||
serr("exit_value=0x%p\n", pjoin->exit_value);
|
||||
sinfo("exit_value=0x%p\n", pjoin->exit_value);
|
||||
}
|
||||
|
||||
/* Post the thread's data semaphore so that the exiting thread
|
||||
@ -230,6 +230,6 @@ int pthread_join(pthread_t thread, FAR pthread_addr_t *pexit_value)
|
||||
ret = OK;
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
sinfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ int pthread_mutex_destroy(FAR pthread_mutex_t *mutex)
|
||||
int ret = OK;
|
||||
int status;
|
||||
|
||||
serr("mutex=0x%p\n", mutex);
|
||||
sinfo("mutex=0x%p\n", mutex);
|
||||
|
||||
if (!mutex)
|
||||
{
|
||||
@ -106,6 +106,6 @@ int pthread_mutex_destroy(FAR pthread_mutex_t *mutex)
|
||||
sched_unlock();
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
sinfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ int pthread_mutex_init(FAR pthread_mutex_t *mutex, FAR const pthread_mutexattr_t
|
||||
int ret = OK;
|
||||
int status;
|
||||
|
||||
serr("mutex=0x%p attr=0x%p\n", mutex, attr);
|
||||
sinfo("mutex=0x%p attr=0x%p\n", mutex, attr);
|
||||
|
||||
if (!mutex)
|
||||
{
|
||||
@ -113,6 +113,6 @@ int pthread_mutex_init(FAR pthread_mutex_t *mutex, FAR const pthread_mutexattr_t
|
||||
#endif
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
sinfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ int pthread_mutex_lock(FAR pthread_mutex_t *mutex)
|
||||
int mypid = (int)getpid();
|
||||
int ret = OK;
|
||||
|
||||
serr("mutex=0x%p\n", mutex);
|
||||
sinfo("mutex=0x%p\n", mutex);
|
||||
|
||||
if (!mutex)
|
||||
{
|
||||
@ -140,7 +140,7 @@ int pthread_mutex_lock(FAR pthread_mutex_t *mutex)
|
||||
* is like PTHREAD_MUTEX_ERRORCHECK)
|
||||
*/
|
||||
|
||||
serr("Returning EDEADLK\n");
|
||||
serr("ERROR: Returning EDEADLK\n");
|
||||
ret = EDEADLK;
|
||||
}
|
||||
}
|
||||
@ -166,7 +166,7 @@ int pthread_mutex_lock(FAR pthread_mutex_t *mutex)
|
||||
sched_unlock();
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
sinfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ int pthread_mutex_trylock(FAR pthread_mutex_t *mutex)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
serr("mutex=0x%p\n", mutex);
|
||||
sinfo("mutex=0x%p\n", mutex);
|
||||
|
||||
if (!mutex)
|
||||
{
|
||||
@ -149,7 +149,7 @@ int pthread_mutex_trylock(FAR pthread_mutex_t *mutex)
|
||||
sched_unlock();
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
sinfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ int pthread_mutex_unlock(FAR pthread_mutex_t *mutex)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
serr("mutex=0x%p\n", mutex);
|
||||
sinfo("mutex=0x%p\n", mutex);
|
||||
|
||||
if (!mutex)
|
||||
{
|
||||
@ -102,7 +102,7 @@ int pthread_mutex_unlock(FAR pthread_mutex_t *mutex)
|
||||
{
|
||||
/* No... return an error (default behavior is like PTHREAD_MUTEX_ERRORCHECK) */
|
||||
|
||||
serr("Holder=%d returning EPERM\n", mutex->pid);
|
||||
serr(ERROR: "Holder=%d returning EPERM\n", mutex->pid);
|
||||
ret = EPERM;
|
||||
}
|
||||
|
||||
@ -137,7 +137,7 @@ int pthread_mutex_unlock(FAR pthread_mutex_t *mutex)
|
||||
sched_unlock();
|
||||
}
|
||||
|
||||
serr("Returning %d\n", ret);
|
||||
sinfo("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -82,8 +82,8 @@ int pthread_setaffinity_np(pthread_t thread, size_t cpusetsize,
|
||||
{
|
||||
int ret;
|
||||
|
||||
serr("thread ID=%d cpusetsize=%d cpuset=%p\n",
|
||||
(int)thread, (int)cpusetsize, cpusetsize);
|
||||
sinfo("thread ID=%d cpusetsize=%d cpuset=%p\n",
|
||||
(int)thread, (int)cpusetsize, cpusetsize);
|
||||
|
||||
DEBUGASSERT(thread > 0 && cpusetsize == sizeof(cpu_set_t) &&
|
||||
cpuset != NULL);
|
||||
|
@ -103,7 +103,7 @@ int pthread_setschedparam(pthread_t thread, int policy,
|
||||
{
|
||||
int ret;
|
||||
|
||||
serr("thread ID=%d policy=%d param=0x%p\n", thread, policy, param);
|
||||
sinfo("thread ID=%d policy=%d param=0x%p\n", thread, policy, param);
|
||||
|
||||
/* Set the errno to some non-zero value (failsafe) */
|
||||
|
||||
|
@ -1078,7 +1078,7 @@ int sched_sporadic_resume(FAR struct tcb_s *tcb)
|
||||
* failure from the standpoint of higher level logic.
|
||||
*/
|
||||
|
||||
sllerr("Failed to allocate timer, nrepls=%d\n",
|
||||
sllerr("ERROR: Failed to allocate timer, nrepls=%d\n",
|
||||
sporadic->nrepls);
|
||||
}
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ static inline FAR struct semholder_s *sem_allocholder(sem_t *sem)
|
||||
#endif
|
||||
else
|
||||
{
|
||||
serr("Insufficient pre-allocated holders\n");
|
||||
serr("ERROR: Insufficient pre-allocated holders\n");
|
||||
pholder = NULL;
|
||||
}
|
||||
|
||||
@ -283,7 +283,7 @@ static int sem_boostholderprio(FAR struct semholder_s *pholder,
|
||||
|
||||
if (!sched_verifytcb(htcb))
|
||||
{
|
||||
serr("TCB 0x%08x is a stale handle, counts lost\n", htcb);
|
||||
serr("ERROR: TCB 0x%08x is a stale handle, counts lost\n", htcb);
|
||||
sem_freeholder(sem, pholder);
|
||||
}
|
||||
|
||||
@ -321,7 +321,7 @@ static int sem_boostholderprio(FAR struct semholder_s *pholder,
|
||||
}
|
||||
else
|
||||
{
|
||||
serr("CONFIG_SEM_NNESTPRIO exceeded\n");
|
||||
serr("ERROR: CONFIG_SEM_NNESTPRIO exceeded\n");
|
||||
}
|
||||
}
|
||||
|
||||
@ -372,7 +372,7 @@ static int sem_boostholderprio(FAR struct semholder_s *pholder,
|
||||
* Name: sem_verifyholder
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
#ifdef CONFIG_DEBUG_ASSERTIONS
|
||||
static int sem_verifyholder(FAR struct semholder_s *pholder, FAR sem_t *sem,
|
||||
FAR void *arg)
|
||||
{
|
||||
@ -397,15 +397,15 @@ static int sem_verifyholder(FAR struct semholder_s *pholder, FAR sem_t *sem,
|
||||
* Name: sem_dumpholder
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_SEM_PHDEBUG)
|
||||
#if defined(CONFIG_DEBUG_INFO) && defined(CONFIG_SEM_PHDEBUG)
|
||||
static int sem_dumpholder(FAR struct semholder_s *pholder, FAR sem_t *sem,
|
||||
FAR void *arg)
|
||||
{
|
||||
#if CONFIG_SEM_PREALLOCHOLDERS > 0
|
||||
err(" %08x: %08x %08x %04x\n",
|
||||
info(" %08x: %08x %08x %04x\n",
|
||||
pholder, pholder->flink, pholder->htcb, pholder->counts);
|
||||
#else
|
||||
err(" %08x: %08x %04x\n", pholder, pholder->htcb, pholder->counts);
|
||||
info(" %08x: %08x %04x\n", pholder, pholder->htcb, pholder->counts);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
@ -434,7 +434,7 @@ static int sem_restoreholderprio(FAR struct semholder_s *pholder,
|
||||
|
||||
if (!sched_verifytcb(htcb))
|
||||
{
|
||||
serr("TCB 0x%08x is a stale handle, counts lost\n", htcb);
|
||||
serr("ERROR: TCB 0x%08x is a stale handle, counts lost\n", htcb);
|
||||
sem_freeholder(sem, pholder);
|
||||
}
|
||||
|
||||
@ -648,7 +648,7 @@ static inline void sem_restorebaseprio_irq(FAR struct tcb_s *stcb,
|
||||
* should be at their base priority.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
#ifdef CONFIG_DEBUG_ASSERTIONS
|
||||
else
|
||||
{
|
||||
(void)sem_foreachholder(sem, sem_verifyholder, NULL);
|
||||
@ -723,7 +723,7 @@ static inline void sem_restorebaseprio_task(FAR struct tcb_s *stcb,
|
||||
* should be at their base priority.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
#ifdef CONFIG_DEBUG_ASSERTIONS
|
||||
else
|
||||
{
|
||||
(void)sem_foreachholder(sem, sem_verifyholder, NULL);
|
||||
@ -819,13 +819,13 @@ void sem_destroyholder(FAR sem_t *sem)
|
||||
#if CONFIG_SEM_PREALLOCHOLDERS > 0
|
||||
if (sem->hhead)
|
||||
{
|
||||
serr("Semaphore destroyed with holders\n");
|
||||
serr("ERROR: Semaphore destroyed with holders\n");
|
||||
(void)sem_foreachholder(sem, sem_recoverholders, NULL);
|
||||
}
|
||||
#else
|
||||
if (sem->holder.htcb)
|
||||
{
|
||||
serr("Semaphore destroyed with holder\n");
|
||||
serr("ERROR: Semaphore destroyed with holder\n");
|
||||
}
|
||||
|
||||
sem->holder.htcb = NULL;
|
||||
@ -1039,7 +1039,9 @@ void sem_canceled(FAR struct tcb_s *stcb, FAR sem_t *sem)
|
||||
#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_SEM_PHDEBUG)
|
||||
void sem_enumholders(FAR sem_t *sem)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG_INFO
|
||||
(void)sem_foreachholder(sem, sem_dumpholder, NULL);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -86,7 +86,7 @@ void sig_deliver(FAR struct tcb_s *stcb)
|
||||
for (sigq = (FAR sigq_t *)stcb->sigpendactionq.head; (sigq); sigq = next)
|
||||
{
|
||||
next = sigq->flink;
|
||||
serr("Sending signal sigq=0x%x\n", sigq);
|
||||
sinfo("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
|
||||
|
@ -301,9 +301,9 @@ int sig_tcbdispatch(FAR struct tcb_s *stcb, siginfo_t *info)
|
||||
irqstate_t flags;
|
||||
int ret = OK;
|
||||
|
||||
serr("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);
|
||||
sinfo("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);
|
||||
|
||||
DEBUGASSERT(stcb != NULL && info != NULL);
|
||||
|
||||
|
@ -76,9 +76,9 @@ int sig_mqnotempty(int pid, int signo, void *sival_ptr)
|
||||
int ret;
|
||||
|
||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
||||
serr("pid=%p signo=%d value=%d\n", pid, signo, value.sival_int);
|
||||
sinfo("pid=%p signo=%d value=%d\n", pid, signo, value.sival_int);
|
||||
#else
|
||||
serr("pid=%p signo=%d sival_ptr=%p\n", pid, signo, sival_ptr);
|
||||
sinfo("pid=%p signo=%d sival_ptr=%p\n", pid, signo, sival_ptr);
|
||||
#endif
|
||||
|
||||
/* Verify that we can perform the signalling operation */
|
||||
|
@ -98,9 +98,9 @@ int sigqueue(int pid, int signo, void *sival_ptr)
|
||||
int ret;
|
||||
|
||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
||||
serr("pid=0x%08x signo=%d value=%d\n", pid, signo, value.sival_int);
|
||||
sinfo("pid=0x%08x signo=%d value=%d\n", pid, signo, value.sival_int);
|
||||
#else
|
||||
serr("pid=0x%08x signo=%d value=%p\n", pid, signo, sival_ptr);
|
||||
sinfo("pid=0x%08x signo=%d value=%p\n", pid, signo, sival_ptr);
|
||||
#endif
|
||||
|
||||
/* Sanity checks */
|
||||
|
@ -134,7 +134,7 @@ int execv(FAR const char *path, FAR char * const argv[])
|
||||
ret = exec(path, (FAR char * const *)argv, symtab, nsymbols);
|
||||
if (ret < 0)
|
||||
{
|
||||
serr("exec failed: %d\n", errno);
|
||||
serr("ERROR: exec failed: %d\n", errno);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ int prctl(int option, ...)
|
||||
|
||||
if (!tcb)
|
||||
{
|
||||
serr("Pid does not correspond to a task: %d\n", pid);
|
||||
serr("ERROR: Pid does not correspond to a task: %d\n", pid);
|
||||
errcode = ESRCH;
|
||||
goto errout;
|
||||
}
|
||||
@ -120,7 +120,7 @@ int prctl(int option, ...)
|
||||
|
||||
if (!name)
|
||||
{
|
||||
serr("No name provide\n");
|
||||
serr("ERROR: No name provide\n");
|
||||
errcode = EFAULT;
|
||||
goto errout;
|
||||
}
|
||||
@ -144,13 +144,13 @@ int prctl(int option, ...)
|
||||
}
|
||||
break;
|
||||
#else
|
||||
serr("Option not enabled: %d\n", option);
|
||||
serr("ERROR: Option not enabled: %d\n", option);
|
||||
errcode = ENOSYS;
|
||||
goto errout;
|
||||
#endif
|
||||
|
||||
default:
|
||||
serr("Unrecognized option: %d\n", option);
|
||||
serr("ERROR: Unrecognized option: %d\n", option);
|
||||
errcode = EINVAL;
|
||||
goto errout;
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ int work_hpstart(void)
|
||||
int errcode = errno;
|
||||
DEBUGASSERT(errcode > 0);
|
||||
|
||||
sllerr("kernel_thread failed: %d\n", errcode);
|
||||
sllerr("ERROR: kernel_thread failed: %d\n", errcode);
|
||||
return -errcode;
|
||||
}
|
||||
|
||||
|
@ -212,7 +212,7 @@ int work_lpstart(void)
|
||||
int errcode = errno;
|
||||
DEBUGASSERT(errcode > 0);
|
||||
|
||||
sllerr("kernel_thread %d failed: %d\n", wndx, errcode);
|
||||
sllerr("ERROR: kernel_thread %d failed: %d\n", wndx, errcode);
|
||||
sched_unlock();
|
||||
return -errcode;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user