Gregory Nutt
6a58f046e6
CONFIG_LIBC_DIFFTIME is no longer used, but was still in Kconfig file. Noted by Sebastien Lorquet
2016-08-25 08:09:23 -06:00
Sebastien Lorquet
51596dc457
Updata difftime. Add a version of difftime for the case where the platform does not support type double
2016-08-25 08:00:50 -06:00
Sebastien Lorquet
a626ba5b70
libc/time: This commit adds the difftime() function. Since the function returns a double, I have isolated it in a CONFIG_LIBC_DIFFTIME option (It also depends on the toolchain-dependent CONFIG_HAVE_DOUBLE so is not available on tiny platforms).
2016-08-24 15:43:57 -06:00
Gregory Nutt
67851849da
Upate ChangeLog
2016-08-22 10:31:52 -06:00
Gregory Nutt
60b70f7dbb
Make xorshift128 re-entrant so that we do do have to suffer the overhad of serialization controls.
2016-08-21 07:47:53 -06:00
Gregory Nutt
757023a909
XorShift128: Add some protection to handle the case where this logic could be called from the interrupt level.
2016-08-20 17:27:41 -06:00
Gregory Nutt
6f833be9d5
Separate XorShift128 PRNG from /dev/urandom and make it generally available.
2016-08-20 11:36:02 -06:00
Gregory Nutt
6e5010e0d0
floor(), floorf(), and floorl(): Fix logic error. Was not correctly handling negative integral value.
2016-08-11 18:21:29 -06:00
Gregory Nutt
155055d564
strtod(): Was not returning endptr on error conditions.
2016-08-11 18:20:25 -06:00
Gregory Nutt
0e35bad987
Update some comments
2016-08-11 10:12:04 -06:00
Gregory Nutt
986c568d34
Correct file header comments
2016-08-07 10:04:02 -06:00
Gregory Nutt
4daa553328
lib_asinl.c edited online with Bitbucket. Add missing # on endif. Noted by David Alessio.
2016-07-31 16:47:25 +00:00
David S. Alessio
c145159c6b
This commit fixes the following libc/math issues:
...
1) asin[f l]() use Newton’s method to converge on a solution. But Newton’s method converges very slowly (> 500,000 iterations) for values of x close to 1.0; and, in the case of asinl(), sometimes fails to converge (loops forever). The attached patch uses an trig identity for values of x > sqrt(2). The resultant functions converge in no more than 5 iterations, 6 for asinl().
2) The NuttX erf[f l]() functions are based on Chebyshev fitting to a good guess. The problem there’s a bug in the implementation that causes the functions to blow up with x near -3.0. This patch fixes that problem. It should be noted that this method returns the error function erf(x) with fractional error less than 1.2E-07 and that’s fine for the float version erff(), but the same method is used for double and long double version which will yield only slightly better precision. This patch doesn't address the issue of lower precision for erf() and erfl().
3) a faster version of copysignf() for floats is included.
2016-07-30 15:43:56 -06:00
Gregory Nutt
d36d9d61be
Trivial spacing change
2016-07-28 09:34:56 -06:00
Gregory Nutt
2b3bc90ba5
Correct a comment
2016-07-27 09:09:40 -06:00
Pierre-noel Bouteville
d4f3954b35
lib_dumpbuffer: Now prints a large on-stack buffer first to avoid problems when the syslog output is prefixed with time.
2016-07-27 08:40:46 -06:00
Gregory Nutt
fd42f898f6
libc: Add mkfifo() and pipe() to libc CSV file
2016-07-22 11:02:51 -06:00
Gregory Nutt
7370d3171a
Move include/nuttx/lib.h to include/nuttx/lib/lib.h
2016-07-21 14:05:44 -06:00
Gregory Nutt
779d3f98ed
Move include/nuttx/math32.h to include/nuttx/lib/math32.h
2016-07-21 14:00:15 -06:00
Gregory Nutt
23a876ab9c
Move include/nuttx/math.h to include/nuttx/lib/math.h
2016-07-21 13:58:09 -06:00
Gregory Nutt
72a45c82b7
Move include/nuttx/regex.h to include/nuttx/lib/regex.h
2016-07-21 13:42:18 -06:00
Gregory Nutt
ee9c66186c
ramdisk.h moved from include/fs/nuttx/ to include/nuttx/drivers.
2016-07-20 14:02:18 -06:00
Gregory Nutt
4b4dbc79a2
Move driver related prototypes out of include/nuttx/fs/fs.h and into new include/drivers/drivers.h
2016-07-20 13:15:37 -06:00
Gregory Nutt
e73e82a923
Move prototypes of mkfifo2() from sys/stat.h and pipe2() from unistd.h. They are non-standard and should not be in such a public place. They are not in include/nuttx/fs/fs.h (which isn't a great place either).
2016-07-20 11:57:18 -06:00
Gregory Nutt
b28fa8a609
Move pipe() and mkpipe() to nuttx/libc. Change syscalls to pipe2() and mkfifo2()
2016-07-19 14:15:26 -06:00
Gregory Nutt
5a35abb488
Improve some comments
2016-07-17 08:31:02 -06:00
Gregory Nutt
07e20479ad
/dev/random: Add configuration option to use the congruential PRNG.
2016-07-17 07:56:25 -06:00
Gregory Nutt
ffd3a31649
Rename lib_rand.c to lib_srand.c
2016-07-17 07:11:09 -06:00
Gregory Nutt
95555a0199
PTY: Add ioctls to support locking and unlocking of the slave. LIBC: Add implementation of unlockpt()
2016-07-15 09:39:33 -06:00
Gregory Nutt
6139860c0b
PTY: Added PTY IOCTL command definitions. Add support for TIOCGPTN. LIB: Implement ptsname() and ptsname_r()
2016-07-15 08:33:47 -06:00
David Alessio
912ad2d345
Fix bug in logf() algorithm that caused erroneous INFINITY results.
2016-07-14 20:15:37 -06:00
Gregory Nutt
96edfdb4c7
libm: Fix/improve range checks in lib_expi() and lib_expif().
2016-07-12 09:59:10 -06:00
Gregory Nutt
3bc504b685
Per comment from David Alession: M_E128 will never be used since it is greater than FLT_MAX.
2016-07-12 09:59:08 -06:00
Gregory Nutt
dfe8596e53
Cosmetic
2016-07-11 14:15:34 -06:00
Gregory Nutt
f9d4b50207
If there are no streams, let printf() fall back to use syslog() for output.
2016-07-11 13:52:21 -06:00
Gregory Nutt
29eae10232
lib_expi/f(): Exponental table should be 'const'. Dimension was wrong for float version.
2016-07-11 13:53:31 -06:00
Gregory Nutt
6a081e118d
Add guess at missing lib_libexpif.c file
2016-07-11 13:43:43 -06:00
David Alessio
261358f1f5
This change should significantly improve the performance of single precision floating point math library functions. The vast majority of changes have to do with preventing the compiler from needlessly promoting floats to doubles, performing the calculation with doubles, only to demote the result to float. These changes only affect the math lib functions that return float.
2016-07-11 07:02:50 -06:00
Gregory Nutt
830af912a1
Add sig_raise()
2016-07-04 09:32:36 -06:00
Gregory Nutt
bde90de12f
Fix libc/zoneinfo build
2016-06-30 16:20:43 -06:00
Gregory Nutt
aa96a1d2ec
Move the TZ/Olson zoneinfo data set from apps/system/zoneinfo to libc/zoneinfo
2016-06-30 15:40:37 -06:00
Gregory Nutt
67ea112767
Update ChangeLog
2016-06-27 13:08:40 -06:00
Gregory Nutt
2a19e16eb0
libc/hex2bin: Move the portable library portion of apps/system/hex2bin to nuttx/libc/hex2bin where it can be shared with the OS internals.
2016-06-27 11:22:38 -06:00
Gregory Nutt
7f16548f57
Replaces last three commits. Does the same thing, but does it in a way that does not change the usage model.
2016-06-21 05:26:08 -06:00
Gregory Nutt
b82743612f
Even the 'unconditional' _alert() macro should be disabled if all debug features are disabled.
2016-06-20 22:38:54 -06:00
Gregory Nutt
505ca542e8
Remove some last traces of lowvsyslog that were missed; Add a SYSLOG emergency channel for handling assertion output more cleanly
2016-06-20 16:11:50 -06:00
Gregory Nutt
2a751068e6
Without lowsyslog() *llerr() is not useful. Eliminate and replace with *err().
2016-06-20 12:44:38 -06:00
Gregory Nutt
43eb04bb8f
Without lowsyslog() *llinfo() is not useful. Eliminate and replace with *info().
2016-06-20 11:59:15 -06:00
Gregory Nutt
d40a473f72
Without lowsyslog() *llwarn() is not useful. Eliminate and replace with *warn().
2016-06-20 09:37:08 -06:00
Gregory Nutt
2b445ddccc
Remove lowsyslog(). The new syslog() includes all of the functionality of lowsyslog(). No longer any need for two interfaces.
2016-06-20 08:57:08 -06:00
Gregory Nutt
fa365e85f5
Update some cmoments
2016-06-20 06:11:22 -06:00
Gregory Nutt
7dd66a4620
Need to pass va_list as a reference to vsyslog. This is because va_list is a structure in some compilers and passing of structures in the NuttX sycalls does not work.
2016-06-19 14:50:00 -06:00
Gregory Nutt
5b2aa7bf99
Remove all traces of CONFIG_SYSLOG
2016-06-19 13:59:43 -06:00
Gregory Nutt
9434d3e945
There is now one-and-only-one copy of syslog_putc. It is in the SYSLOG channel logic and can redirect syslog output as needed. All former syslog_putc versions were renamed and the corresponding SYSLOG device initializaiton now calls syslog_channel()
2016-06-19 13:03:20 -06:00
Gregory Nutt
34f776dce9
Move the OS intensive part of vsyslog and vlowsyslog to drivers/syslog/vsyslog.c and vlowsyslog.c. Also move lib_syslogstrem to drivers/syslog/syslogstream.c
2016-06-19 07:56:24 -06:00
Gregory Nutt
d3b8c03a8a
Fix a few missed changes from *dbg() to *err() and *vdbg() to *info()
2016-06-17 06:00:45 -06:00
Gregory Nutt
28192d3c60
Re-order some conditional compilation; up_interrupt_context() is not generally available to applications.
2016-06-16 20:10:19 -06:00
Gregory Nutt
ea8241027e
syslog() will now automatically redirect output to lowsyslog() if called from an interrupt handler
2016-06-16 19:57:06 -06:00
Gregory Nutt
0c8c7fecf0
Add _ to the beginning of all debug macros to avoid name collisions
2016-06-16 12:33:32 -06:00
Gregory Nutt
24c51ec1ff
Centralize definitions associated with CONFIG_DEBUG_LCD
2016-06-15 11:40:33 -06:00
Gregory Nutt
a98bc05f65
New debug macro: alert(). This is high priority, unconditional output and is used to simplify and stanardize crash error reporting.
2016-06-14 09:07:53 -06:00
Gregory Nutt
90e60513b1
New strtoul[l] functions need to include errno.h
2016-06-13 08:49:46 -06:00
Gregory Nutt
56c5da3030
Cosmetic change from review of PR53
2016-06-13 08:21:06 -06:00
Sebastien Lorquet
15c92867de
Fixes for strtoul/strtoull. Fixes Issue #1
2016-06-13 15:29:05 +02:00
Gregory Nutt
5073bf1de6
Update some comments
2016-06-13 07:02:45 -06:00
Gregory Nutt
4f97f15b5e
graphics/, libc/: Change some err() ERRORS to warn() WARNINGS or info()
2016-06-12 11:11:57 -06:00
Gregory Nutt
b1eb4fdd8e
Rethink some recent warning removal logic
2016-06-12 07:17:04 -06:00
Gregory Nutt
cffef35644
Eliminate some warnings introduced with DEBUG changes
2016-06-11 18:09:39 -06:00
Gregory Nutt
a1469a3e95
Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err()
2016-06-11 15:50:49 -06:00
Gregory Nutt
e99301d7c2
Rename *lldbg to *llerr
2016-06-11 14:55:27 -06:00
Gregory Nutt
86b79b33cf
Reserver the name 'err' for other purposes
2016-06-11 14:40:07 -06:00
Gregory Nutt
1cdc746726
Rename CONFIG_DEBUG to CONFIG_DEBUG_FEATURES
2016-06-11 14:14:08 -06:00
Gregory Nutt
a3bb764305
Add support for a warn() marco that will be between dbg() and info() in priority
2016-06-11 12:38:37 -06:00
Gregory Nutt
fc3540cffe
Replace all occurrences of vdbg with vinfo
2016-06-11 11:59:51 -06:00
Gregory Nutt
3a74a438d9
Rename CONFIG_DEBUG_VERBOSE to CONFIG_DEBUG_INFO
2016-06-11 11:50:18 -06:00
Paul A. Patience
5cfffbfa62
crc64: fix error
2016-06-10 12:30:45 -04:00
Paul A. Patience
9587c551ad
libc/misc: add crc64
2016-06-10 11:03:50 -04:00
Paul A. Patience
fdbbe8dc9a
crc16: fix error
2016-06-10 09:13:43 -04:00
Gregory Nutt
4f81a60ef6
Add a NAN test on 'x' in asin function of lib_asin.c. Suggested by Pierre-noel Bouteville.
2016-05-31 06:31:04 -06:00
Gregory Nutt
5ef3e3e215
Replace confusing references to uIP with just 'the network'
2016-05-30 11:52:07 -06:00
Paul A. Patience
f8f7b7582c
Silence some warnings
2016-05-26 14:06:13 -04:00
Gregory Nutt
ca04284750
Remove comment blocks for empty file sections
2016-05-18 13:00:36 -06:00
Gregory Nutt
4e71c4c9ef
Correct some typos in comments
2016-05-18 12:49:07 -06:00
Gregory Nutt
b9c2b92b10
Add utilities to count the number of nodes in a queue
2016-04-23 13:25:46 -06:00
Alan Carvalho de Assis
7f5339ee5a
drivers/sensors/h1750fvi.c: Add a character driver for Rohm Ambient Light Sensor BH1750FVI.
2016-04-15 08:16:16 -06:00
Gregory Nutt
9008308b64
Remove some block comments before empty code sections
2016-04-11 18:16:04 -06:00
Gregory Nutt
2e49111a17
Fix an error in a DEBUG assertion
2016-04-11 09:07:23 -06:00
Gregory Nutt
6653c5cbf3
Signals: Correct implementation of sigset(). It is not just signal() with a different name; it has some additional signal mask handling functionality
2016-04-11 09:04:54 -06:00
Gregory Nutt
28a4ca6713
libc/signal and include/signal.h: Rename sigset() to signal(). sigset() is the System V function; signal() is the obsoleted POSIX name. These seem to be equivalent. Neither are relevant in modern POSIX programming but the name signal() probably has better credentials. sigset() is now relegated to a #define in signal.h that makes it equivalent to signal().
2016-04-10 14:35:45 -06:00
Kha Vo
bb09dc30a4
sigset: Fix an IAR compilation problem
2016-04-03 13:58:49 -06:00
Kha Vo
51facd904d
bsearch: Fix an IAR compilation problem
2016-04-03 13:56:59 -06:00
Gregory Nutt
53a721cdd7
Fix a cloned error in both sq_cat() and dq_cat()
2016-03-23 14:48:50 -06:00
Gregory Nutt
4a962a36dd
Add library functions to concatenate and move lists. Add scheduler function to merge prioritized function to merge prioritized lists (not yet used).
2016-03-23 08:00:58 -06:00
Gregory Nutt
24468128de
TLS: Simplify
2016-03-11 07:17:32 -06:00
Gregory Nutt
6af9b23df5
libc/netdb: Fix some compile issues when IPv6 is enabled
2016-02-25 13:59:42 -06:00
Gregory Nutt
0fb035f76b
Standardize some naming in code section comments
2016-02-21 18:09:04 -06:00
Gregory Nutt
143d287f11
Fix some missing header file inclusions and a misplaced semi-colon from recent commits
2016-02-21 11:27:55 -06:00
Gregory Nutt
f3356fee5b
SMP: Add macros to CPU set manipulation to sched.h
2016-02-20 18:45:07 -06:00
Gregory Nutt
883a1adfe2
Implement sched_setaffinity() and sched_getaffinity()
2016-02-19 19:18:54 -06:00
Gregory Nutt
28d138c584
Add files that I forgot to add in the last commit
2016-02-19 17:58:47 -06:00