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
+5 -3
View File
@@ -173,9 +173,11 @@ o Task/Scheduler (sched/)
NOTE: glibc behaves this way unless __thread is defined then, NOTE: glibc behaves this way unless __thread is defined then,
in that case, it behaves like NuttX (using TLS to save the in that case, it behaves like NuttX (using TLS to save the
thread local errno). thread local errno).
Status: Closed. The existing solution is better (although its Status: Closed. The existing solution is better and compatible with
incompatibilities could show up in porting some code). thread-aware GLIBC (although its incompatibilities could show
Priority: Low up in porting some code). I will retain this issue for
referencei only.
Priority: N/A
Title: SCALABILITY Title: SCALABILITY
Description: Task control information is retained in simple lists. This Description: Task control information is retained in simple lists. This
+1 -1
View File
@@ -318,7 +318,7 @@ static int bmp180_checkid(FAR struct bmp180_dev_s *priv)
devid = bmp180_getreg8(priv, BMP180_DEVID); devid = bmp180_getreg8(priv, BMP180_DEVID);
sninfo("devid: 0x%02x\n", devid); sninfo("devid: 0x%02x\n", devid);
if (devid != (uint16_t) DEVID) if (devid != (uint16_t)DEVID)
{ {
/* ID is not Correct */ /* ID is not Correct */
+20 -7
View File
@@ -181,7 +181,23 @@ static int irq_callback(int irq, FAR struct irq_info_s *info,
#endif #endif
leave_critical_section(flags); 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) if (copy.count == 0)
{ {
@@ -210,7 +226,7 @@ static int irq_callback(int irq, FAR struct irq_info_s *info,
} }
else else
{ {
uint64_t intcount = (uint64_t)intpart * elapsed / TICK_PER_SEC; uint64_t intcount = ((uint64_t)intpart * elapsed) / TICK_PER_SEC;
fracpart = (unsigned int) fracpart = (unsigned int)
(((copy.count - intcount) * TICK_PER_SEC * 1000) / elapsed); (((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; count = (unsigned long)copy.count;
} }
#else #else
# error Missing logic # error Missing logic
#endif #endif
@@ -270,10 +285,8 @@ static int irq_open(FAR struct file *filep, FAR const char *relpath,
finfo("Open '%s'\n", relpath); finfo("Open '%s'\n", relpath);
/* PROCFS is read-only. Any attempt to open with any kind of write /* This PROCFS file is read-only. Any attempt to open with write access
* access is not permitted. * is not permitted.
*
* REVISIT: Write-able proc files could be quite useful.
*/ */
if ((oflags & O_WRONLY) != 0 || (oflags & O_RDONLY) == 0) if ((oflags & O_WRONLY) != 0 || (oflags & O_RDONLY) == 0)
+2 -2
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 * 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 * among all tasks waiting for the all semaphores held by the sporadic
* task. Perhaps that information could be retained by the priority * task. That information could be retained by the priority inheritance
* inheritance logic for use here? * logic of sem_holder.c for use here.
*/ */
if (tcb->sched_priority > tcb->base_priority) if (tcb->sched_priority > tcb->base_priority)