Update some comments

This commit is contained in:
Gregory Nutt 2018-02-03 09:35:46 -06:00
parent 2683f713ab
commit fad70bf90e
4 changed files with 28 additions and 13 deletions

8
TODO
View File

@ -173,9 +173,11 @@ o Task/Scheduler (sched/)
NOTE: glibc behaves this way unless __thread is defined then,
in that case, it behaves like NuttX (using TLS to save the
thread local errno).
Status: Closed. The existing solution is better (although its
incompatibilities could show up in porting some code).
Priority: Low
Status: Closed. The existing solution is better and compatible with
thread-aware GLIBC (although its incompatibilities could show
up in porting some code). I will retain this issue for
referencei only.
Priority: N/A
Title: SCALABILITY
Description: Task control information is retained in simple lists. This

View File

@ -318,7 +318,7 @@ static int bmp180_checkid(FAR struct bmp180_dev_s *priv)
devid = bmp180_getreg8(priv, BMP180_DEVID);
sninfo("devid: 0x%02x\n", devid);
if (devid != (uint16_t) DEVID)
if (devid != (uint16_t)DEVID)
{
/* ID is not Correct */

View File

@ -181,7 +181,23 @@ static int irq_callback(int irq, FAR struct irq_info_s *info,
#endif
leave_critical_section(flags);
/* Don't bother if count == 0 */
/* Don't bother if count == 0.
*
* REVISIT: There is a logic problem with skipping if the count is zero.
* Normally this is a good thing because it makes the output concise.
* However, it can be a problem under certain conditions:
*
* It may take multiple passes through the IRQ table to enumerate the
* interrupts if the number of interrupts reported is large or if the size
* of the user buffer is small. If a count is zero it will be skipped on
* the first time through but if it becomes non-zero on the second time
* through, the output will be corrupted. Similarly if the count is non-
* zero the first time through and zero the second.
*
* A proper fix would require keep better track of where we left off
* between passes. Current that position is remembered only by the
* byte offset into the pseudo-file, f_pos.
*/
if (copy.count == 0)
{
@ -210,7 +226,7 @@ static int irq_callback(int irq, FAR struct irq_info_s *info,
}
else
{
uint64_t intcount = (uint64_t)intpart * elapsed / TICK_PER_SEC;
uint64_t intcount = ((uint64_t)intpart * elapsed) / TICK_PER_SEC;
fracpart = (unsigned int)
(((copy.count - intcount) * TICK_PER_SEC * 1000) / elapsed);
}
@ -225,7 +241,6 @@ static int irq_callback(int irq, FAR struct irq_info_s *info,
{
count = (unsigned long)copy.count;
}
#else
# error Missing logic
#endif
@ -270,10 +285,8 @@ static int irq_open(FAR struct file *filep, FAR const char *relpath,
finfo("Open '%s'\n", relpath);
/* PROCFS is read-only. Any attempt to open with any kind of write
* access is not permitted.
*
* REVISIT: Write-able proc files could be quite useful.
/* This PROCFS file is read-only. Any attempt to open with write access
* is not permitted.
*/
if ((oflags & O_WRONLY) != 0 || (oflags & O_RDONLY) == 0)

View File

@ -140,8 +140,8 @@ static int sporadic_set_lowpriority(FAR struct tcb_s *tcb)
*
* In order to do this we would need to know the highest priority from
* among all tasks waiting for the all semaphores held by the sporadic
* task. Perhaps that information could be retained by the priority
* inheritance logic for use here?
* task. That information could be retained by the priority inheritance
* logic of sem_holder.c for use here.
*/
if (tcb->sched_priority > tcb->base_priority)