Skip to content

Commit

Permalink
Update TODO list + cosmetic changes to clock_systimer.c
Browse files Browse the repository at this point in the history
  • Loading branch information
gregory-nutt committed Oct 3, 2014
1 parent 8d43a6b commit da29907
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 28 deletions.
34 changes: 9 additions & 25 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ nuttx/
(6) Graphics subystem (graphics/)
(1) Pascal add-on (pcode/)
(1) Documentation (Documentation/)
(3) Build system / Toolchains
(2) Build system / Toolchains
(3) Linux/Cywgin simulation (arch/sim)
(4) ARM (arch/arm/)
(1) ARM/C5471 (arch/arm/src/c5471/)
Expand Down Expand Up @@ -1239,6 +1239,12 @@ o Pascal Add-On (pcode/)
Status: Open
Priority: Medium

Title: PDBG
Description: Move the the pascal p-code debugger into the NuttX apps/ tree
where it can be used from the NSH command line.
Status: Open
Priority: Low

o Documentation (Documentation/)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand All @@ -1261,29 +1267,6 @@ o Build system
Status: Open
Priority: Low -- unless some dependency-related build issues is discovered.

Title: SETENV.H
Description: Logic in most setenv.sh files can create the following problem
on many platforms:

$ . ./setenv.sh
basename: invalid option -- 'b'
Try `basename --help' for more information.

The problem is that $0 is the current running shell which may include
a dash in front:

$ echo $0
-bash

But often is just /bin/bash (and the problem does not occur. The fix
is:

-if [ "$(basename $0)" = "setenv.sh" ]; then
+if [ "$_" = "$0" ] ; then
Status: Open
Priority: Low. Use of setenv.sh is optional and most platforms do not have
this problem. Scripts will be fixed one-at-a-time as is appropriate.

Title: MAKE EXPORT LIMITATIONS
Description: The top-level Makefile 'export' target that will bundle up all of the
NuttX libraries, header files, and the startup object into an export-able
Expand Down Expand Up @@ -1320,7 +1303,8 @@ o Linux/Cywgin simulation (arch/sim)
Status: Open
Priority: Low, unless there is a need for developing a higher fidelity simulation
I have been thinking about how to implement simulated interrupts in
the simulation. I think a solution would work like this.
the simulation. I think a solution would work like this:
http://www.nuttx.org/doku.php?id=wiki:nxinternal:simulator

Title: ROUND-ROBIN SCHEDULING IN THE SIMULATOR
Description: Since the simulation is not pre-emptible, you can't use round-robin
Expand Down
8 changes: 5 additions & 3 deletions sched/clock/clock_systimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

#undef clock_systimer
#undef clock_systimer64

/****************************************************************************
* Private Data
****************************************************************************/
Expand Down Expand Up @@ -99,12 +99,13 @@ uint32_t clock_systimer(void)
/* Return the current system time truncated to 32-bits */

return (uint32_t)(g_system_timer & 0x00000000ffffffff);

#else
/* Return the current system time */

return g_system_timer;
#endif

#endif
#endif
}

Expand Down Expand Up @@ -134,14 +135,15 @@ uint64_t clock_systimer64(void)

(void)up_timer_gettime(&ts);

/* Convert to a 64- then 32-bit value */
/* Convert to a 64-bit value */

return MSEC2TICK(1000 * (uint64_t)ts.tv_sec + (uint64_t)ts.tv_nsec / 1000000);

#else
/* Return the current system time */

return g_system_timer;

#endif
}
#endif

0 comments on commit da29907

Please sign in to comment.