Lokesh B V
59643679f8
libc/stdlib: Error Fix
...
1.Fix an error in mkstemp() the could result in an infinite loop.
2.Fix for wrong output in some cases.
For Example:
1) input: "FILEXX"
output: "FILE00" and repeats same output for further invocations of mkstemp().
But, the ouput has to be FILE01, FILE02, ...., FILEZZ.
2)input: "FILEXXXXXX"
output: "FILE100000", for next invocation "FILE200000" and so on
But it's good, if the ouput goes like FILE000001, FILE000002, ..., FILE000101, ...
Signed-off-by: Lokesh B V <lokeshbv333@gmail.com>
2017-07-21 12:48:05 +05:30
Lokesh B V
beec197c69
libc/math: Fix wrong ouput in ceil() API
...
Ex:for input x = 1.0, the ouput should be 1.0, but the ouput was 2.0.
Signed-off-by: Lokesh B V <lokeshbv333@gmail.com>
2017-07-20 18:07:53 +05:30
Lokesh B V
6062af0a94
libc/math: Fix wrong ouput in modf() API
...
The sign of integral part given by the modf() should be same as sign of input.
But for inputs between 0 and 1, the sign of integral part was not same as sign of input.
Signed-off-by: Lokesh B V <lokeshbv333@gmail.com>
2017-07-20 17:59:39 +05:30
Gregory Nutt
5033a6def7
Socket interface: Added addref() and sockcaps() interfaces.
2017-07-13 13:36:18 -06:00
Alan Carvalho de Assis
0d08ce500e
C library: Fix an error in mkstemp() the could result in an infinite loop.
2017-07-12 15:25:55 -06:00
Gregory Nutt
56e8f480f5
Remove dangling whitespace at the end of some lines.
2017-06-28 10:39:54 -06:00
jlecoeur
80d0664647
Merged in jlecoeur/nuttx-fork/pr-arm-none-eabi-gcc7 (pull request #424 )
...
Fix warning implicit-fallthrough with arm-none-eabi-gcc 7
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-06-28 16:21:49 +00:00
Cristian Condurache
2ea054fead
Merged in ccondurache/nuttx/fix_elf_arm_checkarch (pull request #422 )
...
Fix ELF loader up_checkarch on ARM arch
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-06-28 16:19:51 +00:00
Julien Lecoeur
f26e83d0a1
Fix -Werror=implicit-fallthrough on gcc7
2017-06-28 17:48:04 +02:00
Cristian Condurache
d4add14823
Fix ELF loader up_checkarch on ARM arch
2017-06-28 18:11:39 +03:00
Ritjaina
3e3729d35f
netdb: Fixed buffer size used for sending DNS queries should depend on the configured DNS name size.
2017-06-23 06:30:33 -06:00
Gregory Nutt
23a6ff5846
pthreads: Move pthread_barrier_init, pthread_barrier_destroy, and pthread_barrier_wait from sched/pthreads to libc/pthreads. This just coordinate other OS interface calls but are not a fundamental OS interfaces and, hence, do not belong within the OS.
2017-06-14 07:59:54 -06:00
Gregory Nutt
ae168bffa0
pthreads: Move pthread_cond_init and pthread_cond_destory from sched/pthreads to libc/pthreads. This just coordinate other OS interface calls but are not a fundamental OS interfaces and, hence, do not belong within the OS.
2017-06-14 07:48:45 -06:00
Gregory Nutt
557fd6504f
pthreads: Move pthread_once from sched/pthreads to libc/pthreads. pthread_once just coordinates other OS interface calls but is not a fundamental OS interface and, hence, does not belong within the OS.
2017-06-14 07:31:10 -06:00
Gregory Nutt
8ae5450268
pthreads: Move pthread_yield from sched/pthreads to libc/pthreads. it is a simple wrapper for sched_yield and does not belong within the OS.
2017-06-14 07:31:10 -06:00
Gregory Nutt
ee7217be63
gethostbyname_r: Fix check for space in buffer.
2017-06-12 06:47:43 -06:00
Gregory Nutt
e6a8476382
Add some REVISIT comments.
2017-06-11 18:56:38 -06:00
Jim Paris
4504ca7c82
Whoops -- that #include <cxxabi.h> wasn't supposed to sneak in there. If present, it may already define a __cxxabiv1::__guard that we could use, but that file comes from libstdc++, and I don't think the NuttX buildroot-based toolchain would have that, which is why we need libxx in the first place.
2017-06-09 07:40:31 -06:00
Daniel Agar
30ab574060
libfflush remove extra semicolon
2017-06-04 12:20:48 -04:00
Jussi Kivilinna
705185be1e
libc/string/lib_vikmemcpy.c: fix 'casting pointer to integer of different size' compiler warnings
2017-05-31 09:33:44 -06:00
Masayuki Ishikawa
6ccc01ad46
netdb: Fix bugs in lib_gethostbynamer.c
...
This fix sets h_name in struct hostent returned by gethostbyname()
Signed-off-by: Masayuki Ishikawa <masayuki.ishikawa@gmail.com>
2017-05-25 10:59:10 +09:00
Masayuki Ishikawa
2b028bc4e5
netdb: Fix time info in lib_dnscache.c
...
Signed-off-by: Masayuki Ishikawa <masayuki.ishikawa@gmail.com>
2017-05-23 16:02:41 +09:00
Matias v01d
820ef7059e
libc/wchar: Versions mbrlen and mbsrtowcs taken and adapted from FreeBSD code (at https://github.com/freebsd/freebsd/ )
2017-05-13 17:07:40 -06:00
Matias v01d
7cc2ee25ec
libc/wchar: Versions mbrlen and mbsrtowcs taken and adapted from FreeBSD code (at https://github.com/freebsd/freebsd/ )
2017-05-13 17:06:58 -06:00
Gregory Nutt
6e4918c557
Remove CONFIG_ARM_TOOLCHAIN_GNU; replace with CONFIG_ARCH_TOOLCHAIN_GNU
2017-05-13 13:28:15 -06:00
Gregory Nutt
0de294a586
Fix lots of occurrences of 'the the', 'the there', 'the these', 'the then', 'the they.
2017-05-11 13:35:56 -06:00
Jussi Kivilinna
afc46cb7ba
fixedmath: add square root and b32_t conversion operators
2017-05-04 06:50:08 -06:00
Gregory Nutt
d5207efb5a
Be consistent... Use Name: consistent in function headers vs Function:
2017-04-21 16:33:14 -06:00
Ritajina
eab139a539
libc/netdb: in dns_query_callback, ret != -EADDRNOTAVAIL condition consumes error returns including EAGAIN in this case, dns query retransmission doesn't work
2017-04-12 06:41:08 -06:00
Gregory Nutt
948332ca34
pthreads: Backed most of last pthread changes. Found the 'real' root poblem. A one like error in pthread_mutex.c.
2017-04-10 09:51:03 -06:00
Gregory Nutt
84849cfc5e
examples/ostest: pthread rwlock cleanup handlers must call pthread_consistent, not pthread_mutex_unlock() on cancellation if robust mutexes are enabled.
2017-04-10 08:44:08 -06:00
Juha Niskanen
755e9312b5
pthread: use cancel cleanup handlers in rwlock
2017-04-10 07:18:16 -06:00
Mark Schulte
2b1ca79b4b
pthread rwlock bugfixes
2017-04-07 15:45:24 -06:00
Gregory Nutt
b631dc886f
Remove CONFIG_PTHREAD_RWLOCK. Rwlock interfaces built unconditionally.
2017-04-07 07:34:22 -06:00
Mark Schulte
7bb26d2615
pthreads: Adding rwlock implementation
...
Adding an implementation for read/write locks into the pthread library.
These locks are writer priority, such that if any writers come in they
are given priority for writing.
2017-04-07 07:03:00 -06:00
Gregory Nutt
1b6630ee75
6loWPAN: Fix compile errors and warnings when building the complete 6loWPAN configuration.
2017-04-02 17:46:22 -06:00
Gregory Nutt
0ded0f5866
Update README and comments
2017-03-30 08:43:07 -06:00
Jussi Kivilinna
dffb8a67e3
Add entropy pool and strong random number generator
...
Entropy pool gathers environmental noise from device drivers, user-space, etc., and returns good random numbers, suitable for cryptographic use. Based on entropy pool design from *BSDs and uses BLAKE2Xs algorithm for CSPRNG output.
Patch also adds /dev/urandom support for using entropy pool RNG and new 'getrandom' system call for getting randomness without file-descriptor usage (thus avoiding file-descriptor exhaustion attacks). The 'getrandom' interface is similar as 'getentropy' and 'getrandom' available on OpenBSD and Linux respectively.
2017-03-30 07:38:37 -06:00
Gregory Nutt
b07d3fc305
Rename CONFIG_MUTEX_TYPES to CONFIG_PTHREAD_MUTEX_TYPES
2017-03-27 09:08:14 -06:00
Gregory Nutt
d1196ddb60
pthread mutex: Forgot to add files in last commit
2017-03-27 07:49:13 -06:00
Gregory Nutt
666208cf23
pthread mutexes: Add option to support both unsafe and robust mutexes via pthread_mutexattr_get/setrobust().
2017-03-26 18:37:24 -06:00
Gregory Nutt
bacc4e9b93
Update errno values. Add new values; remove obsolete values
2017-03-26 09:22:00 -06:00
Jussi Kivilinna
d0c54039dc
Add ffsl(), ffsll(), fls(), flsl(), flsll() and use GCC's __builtin_ctz/__builtin_clz for faster implementation of these
2017-03-24 09:41:31 -06:00
Jussi Kivilinna
acec5e3199
vsnprintf(): If size is zero, then vsnprintf() should return the size of the required buffer without writing anything. This is same fix that was done for snprintf in 2014 by commit 59846a8fe9
.
2017-03-17 17:34:56 -06:00
Jussi Kivilinna
ac0d957f26
libc: printf: fix precision for string formatting. Fixes use of format precision to truncate input string.
2017-03-17 17:32:44 -06:00
Gregory Nutt
360539afac
Priority inheritance: When CONFIG_SEM_PREALLOCHOLDERS==0, there is only a single, hard-allocated holder structure. This is problem because in sem_wait() the holder is released, but needs to remain in the holder container until sem_restorebaseprio() is called. The call to sem_restorebaseprio() must be one of the last things the sem_wait() does because it can cause the task to be suspended. If in sem_wait(), a new task gets the semaphore count then it will fail to allocate the holder and will not participate in priority inheritance. This fix is to add two hard-allocated holders in the sem_t structure: One of the old holder and one for the new holder.
2017-03-10 09:30:15 -06:00
Gregory Nutt
769427ed5a
pthreads: Fix pthread_mutexattr_init(). It was not initializing the protocol field when priority inheritance is enabled.
2017-03-10 09:24:41 -06:00
Gregory Nutt
ba117284c2
Update some coments.
2017-03-08 14:30:47 -06:00
Alan Carvalho de Assis
d43380d543
Add wcstoull function
2017-03-08 13:28:50 -06:00
Alan Carvalho de Assis
d9bfcfc330
Add mbsnrtowcs wcsnrtombs just returning sucess
2017-03-08 13:24:03 -06:00