[libc] Update libc.

1. Add POSIX termios implementation;
2. Add POSIX signals implementation;
3. Add stdio for each libc.
This commit is contained in:
bernard
2017-10-15 22:41:59 +08:00
parent b27c7e4826
commit 5c7b16d00b
37 changed files with 1404 additions and 343 deletions

View File

@@ -194,7 +194,7 @@ int pthread_detach(pthread_t thread)
ptd = _pthread_get_data(thread);
if (thread->stat == RT_THREAD_CLOSE)
if ((thread->stat & RT_THREAD_STAT_MASK)== RT_THREAD_CLOSE)
{
/* delete joinable semaphore */
if (ptd->joinable_sem != RT_NULL)
@@ -354,10 +354,21 @@ RTM_EXPORT(pthread_atfork);
int pthread_kill(pthread_t thread, int sig)
{
return EOPNOTSUPP;
#ifdef RT_USING_SIGNALS
return rt_thread_kill(thread, sig);
#else
return ENOSYS;
#endif
}
RTM_EXPORT(pthread_kill);
#ifdef RT_USING_SIGNALS
int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset)
{
return sigprocmask(how, set, oset);
}
#endif
void pthread_cleanup_pop(int execute)
{
_pthread_data_t *ptd;

View File

@@ -268,11 +268,13 @@ int pthread_barrier_wait(pthread_barrier_t *barrier);
/* Signal Generation and Delivery, P1003.1b-1993, p. 63
NOTE: P1003.1c/D10, p. 34 adds sigev_notify_function and
sigev_notify_attributes to the sigevent structure. */
#if 0
union sigval
{
int sival_int; /* Integer signal value */
void *sival_ptr; /* Pointer signal value */
};
#endif
struct sigevent
{