Gregory Nutt
21746c588f
Update Copyright for NuttX adaption
2017-01-19 09:57:16 -06:00
Gregory Nutt
eba03c2590
Math library: Leverage optimized ARM functions from BSD license ARM file.
2017-01-19 09:37:33 -06:00
Gregory Nutt
e3a535f66f
Fix verboten C99/C11 construct in sscanf()
2017-01-09 11:23:05 -06:00
Gregory Nutt
bbc16f9aea
libc/Kconfig: Correct an error in variable type
2017-01-09 11:15:06 -06:00
Gregory Nutt
81712be04e
sscanf: Backs out logic of ca1150ce6c
2017-01-09 10:35:28 -06:00
Gregory Nutt
7fbc3ba1e1
Comments should begin with uppercase letters.
2017-01-09 09:22:46 -06:00
Gregory Nutt
07e832340f
dtoa: More white space
2017-01-07 15:13:48 -06:00
Gregory Nutt
e568253eb3
Update README, some comments, and fix some spacing.
2017-01-07 10:36:18 -06:00
Pierre-noel Bouteville
562fa6b400
Add debug assertion in libdtoa to catch attempts to use floating point output formats from within an interrupt handler. That will cause assertions or crashes downstream because __dtoa will attempt to allocate memory.
2017-01-06 15:45:03 -06:00
Gregory Nutt
0b52e6f571
Font cache: Replace fixed-size array with variable size link list.
2017-01-06 09:07:25 -06:00
Gregory Nutt
8ce1fdaab0
Add an attribution to the scanset addition to sscanf()
2016-12-17 16:18:04 -06:00
Author: Aleksandr Vyhovanec
7be1b86a81
Add scansets to the scanf function. Enabled CONFIG_LIBC_SCANSET option.
2016-12-17 14:39:19 -06:00
Gregory Nutt
c83da3c48f
Remove minnsh configurations and support logic: up_getc() and lowinstream.
...
This was an interesting exercise to see just how small you could get NuttX, but otherwise it was not useful: (1) the NSH code violated the OS interface layer by callup up_getc and up_putc directly, and (2) while waiting for character input, NSH would call up_getc() which would hog all of the CPU. NOt a reasonably solution other than as a proof of concept.
2016-12-13 18:01:23 -06:00
Gregory Nutt
5d99a37ab7
Update user manual
2016-12-11 13:40:26 -06:00
Gregory Nutt
d648f9c8b4
Add task_testcancel()
2016-12-10 16:34:14 -06:00
Gregory Nutt
50a25c3fde
Forget to add files before last commits
2016-12-10 16:12:35 -06:00
Gregory Nutt
f132960789
Add task_setcanceltype()
2016-12-10 16:06:14 -06:00
Gregory Nutt
4c68c93f47
Forgot to add some files in the last commit.
2016-12-10 07:41:56 -06:00
Gregory Nutt
e62b3bccd3
pthread_setcanceltype() and pthread_testcancel() do not have to be system calls if cancellation points are not enabled.
2016-12-10 07:40:48 -06:00
Gregory Nutt
7fce8022c6
Finishes all cancellation point logic
2016-12-09 16:50:34 -06:00
Gregory Nutt
16be9b332e
More cancellation points
2016-12-09 15:17:58 -06:00
Gregory Nutt
7c4e3e21b8
Allow option to enable IP address conversions even when the IP address family is not supported.
2016-12-04 09:06:08 -06:00
Eunbong Song
4545af3249
sleep() was returning remaining nanoseconds (kind of), instead the remaining seconds.
2016-11-15 06:47:59 -06:00
Juha Niskanen
b7ed12ebd3
Patch brings strtol() and related functions more conformant with POSIX. Corner cases like strtol(-2147483648, NULL, 10) now pass clang -fsanitize=integer without warnings.
2016-11-10 06:18:42 -06:00
Gregory Nutt
796969f6b6
Update TODO. Provide do-nothing stubs for mutex attribute interfaces if features not enabled. pthread_cond includes a signaling semaphore and should call sem_setprotocol.
2016-11-05 11:06:52 -06:00
Gregory Nutt
b0dffdc2ca
Fix a number of header files with mismatched 'extern C {' and '}'
2016-11-05 07:25:05 -06:00
Gregory Nutt
73fc186beb
sem_setprotocol: Handle a case of missing proxy for sem_setprotocol. Reorder so that (1) this error is avoided, and (2) >No proxy is needed if priority inheritance is not enabled.
2016-11-03 18:51:38 -06:00
Gregory Nutt
4c8ec0d2ca
include/nuttx/semaphore.h: Fix broken macros
2016-11-03 12:49:44 -06:00
Gregory Nutt
d5b4d848d3
Move protoypes for the non-standard include/semaphore.h file to the non-standard include/nuttx/semaphore.h with the other non-standard semaphore interfaces.
2016-11-02 14:43:03 -06:00
Gregory Nutt
b738a646ad
sem_getprotocol() can be in C library
2016-11-02 09:29:16 -06:00
Gregory Nutt
92d3022411
Add pthread_mutexattr_get/set_protocol and non-standard sem_get/set_protocol. These may use to enable or disable priority inheritance on a single semaphore.
2016-11-02 09:05:18 -06:00
Gregory Nutt
14e06a3ce3
libc/pthread: Rename long files so that they are more readable
2016-11-02 07:37:56 -06:00
Gregory Nutt
123c520db4
Correct time initialization for the case where time is initialized from settings in the .config file. The correct range for month (tm_mon) internally is 0-11, not 1-12 as it is in the .config file.
2016-10-27 08:36:24 -06:00
Gregory Nutt
0967864c92
Correct clock initialization. The correct range for the month is 0-11 but is entered as 1-12 in the .config file
2016-10-27 08:32:23 -06:00
Gregory Nutt
57ad019fba
Revert "Correct a problem in clock_gettime(CLOCK_REALTIME, &time); which is ahead by 1 month of the specified CONFIG_START_MONTH"
...
I don't believe this change is correct in general. Nomralling clock_isleapyear() is called with tm_mon which is in the range of 0-11. That change would be bad for that range. It would make sense for a range of 1-12, but that is not how tm_mon is defined.
This reverts commit 1796a25e53
.
2016-10-27 08:20:16 -06:00
Marc Rechté
1796a25e53
Correct a problem in clock_gettime(CLOCK_REALTIME, &time); which is ahead by 1 month of the specified CONFIG_START_MONTH
2016-10-27 07:10:36 -06:00
Gregory Nutt
177239feae
sscanf: Use strtof() instead of strtod() if a short floating point value was requested. The should help performance with MCUs with 32-bit FPU support
2016-10-22 13:42:43 -06:00
Gregory Nutt
d08596a653
libc/stdlib: Fix a few minor coding style issues
2016-10-22 13:27:56 -06:00
Gregory Nutt
41137b82fa
Add strtold()
2016-10-22 13:02:55 -06:00
Gregory Nutt
9438c42fff
strtof: Also make sure that all integer values use in expressions are cast to float
2016-10-20 13:06:55 -06:00
Gregory Nutt
e30a47ba46
libc: Make sure that all constant floating point values have F suffix in strtof()
2016-10-20 13:03:15 -06:00
Gregory Nutt
2b22666554
Forgot to add a file before the last commit
2016-10-20 12:57:27 -06:00
Gregory Nutt
30ab01b1d8
strtof: Add strtof() as simply a compy of strtod with types and limits changed
2016-10-20 12:07:12 -06:00
Gregory Nutt
97b3240737
Minor changes from review of last PR
2016-10-19 11:50:19 -06:00
Gregory Nutt
8039173c9e
Merged in david_s5/nuttx/upstream_local_fix_to_greg (pull request #153 )
...
DO NOT MERGE Until Alan Verifies this -
2016-10-19 17:44:52 +00:00
David Sidrane
b1ed7910f0
Allows c++ code to compile with or without CONFIG_LIBC_LOCALE
...
and will generate a link error if CONFIG_LIBC_LOCALE is not defined
and setlocale is referneced. With CONFIG_LIBC_LOCALE defined
setlocale will act as if MB string is not supported and return
"C" for POSIX. C and ""
2016-10-19 06:49:19 -10:00
Gregory Nutt
54fd0f0a04
Fix a few more compile issues with the new wide character support
2016-10-19 08:18:46 -06:00
Alan Carvalho de Assis
b852bb3403
Add iswctype, towlower, towupper and wcsftime functions
2016-10-19 07:49:33 -06:00
Gregory Nutt
890a9eb45d
Fix a few wide character build issues
2016-10-18 19:11:09 -06:00
Alan Carvalho de Assis
dfdde741e3
C library: Add wctype.h; Move lib_wctype.c to libc/wctype
2016-10-18 18:24:58 -06:00
Alan Carvalho de Assis
4d39b513b5
Add functions wcrtomb, wcslcpy, wcsxfrm, wctob, wctomb, wctype, localeconv, strcoll, strxfrm
2016-10-18 18:15:54 -06:00
Alan Carvalho de Assis
402b876869
Include wchar.h to lib_libvsprintf.c to fix compilation error
2016-10-18 13:32:03 -06:00
Alan Carvalho de Assis
f01c5b79fc
C library: Add functions btowc, mbrtowc, mbtowc, wcscmp, wcscoll, wmemmove
2016-10-18 08:05:28 -06:00
Gregory Nutt
0249f3271e
C library: Add setlocale to libc.csv
2016-10-17 17:15:19 -06:00
Alan Carvalho de Assis
5354bc1dc7
Add wcslen, wmemchr, wmemcmp, wmemcpy and wmemset to NuttX
2016-10-17 16:02:08 -06:00
Gregory Nutt
84049a19ba
C library: Add a dummy setlocale() function to avoid drawing the function from newlib
2016-10-17 09:45:12 -06:00
David Sidrane
7ee82c0168
Fixes sscan %sn where strlen(data) < n
2016-10-15 06:31:35 -10:00
Sebastien Lorquet
aed8a602b8
stdio: Add support for remove()
2016-08-25 08:40:34 -06:00
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