Changeset 38d8849 in mainline for uspace/lib
- Timestamp:
- 2018-07-16T15:58:51Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- db51219f
- Parents:
- c124c985
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-14 16:53:46)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-16 15:58:51)
- Location:
- uspace/lib
- Files:
-
- 1 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/arm32/include/libarch/fibril.h
rc124c985 r38d8849 39 39 #include <types/common.h> 40 40 #include <align.h> 41 #include <thread.h>42 41 #include <libarch/fibril_context.h> 43 42 -
uspace/lib/c/generic/fibril.c
rc124c985 r38d8849 36 36 #include <adt/list.h> 37 37 #include <fibril.h> 38 #include <thread.h>39 38 #include <stack.h> 40 39 #include <tls.h> … … 49 48 #include <async.h> 50 49 50 #include "private/thread.h" 51 51 #include "private/fibril.h" 52 52 -
uspace/lib/c/generic/private/thread.h
rc124c985 r38d8849 36 36 #define LIBC_PRIVATE_THREAD_H_ 37 37 38 #include <time.h> 38 39 #include <abi/proc/uarg.h> 40 #include <libarch/thread.h> 41 #include <abi/proc/thread.h> 39 42 40 43 extern void __thread_entry(void); 41 44 extern void __thread_main(uspace_arg_t *); 45 46 extern errno_t thread_create(void (*)(void *), void *, const char *, thread_id_t *); 47 extern void thread_exit(int) __attribute__((noreturn)); 48 extern void thread_detach(thread_id_t); 49 extern thread_id_t thread_get_id(void); 50 extern int thread_usleep(useconds_t); 51 extern unsigned int thread_sleep(unsigned int); 42 52 43 53 #endif -
uspace/lib/c/generic/rcu.c
rc124c985 r38d8849 80 80 #include <assert.h> 81 81 #include <time.h> 82 #include <thread.h>83 82 84 83 #include "private/fibril.h" -
uspace/lib/c/generic/stats.c
rc124c985 r38d8849 184 184 } 185 185 186 /** Get single thread statistics187 *188 * @param thread_id Thread ID we are interested in.189 *190 * @return Pointer to the stats_thread_t structure.191 * If non-NULL then it should be eventually freed192 * by free().193 *194 */195 stats_thread_t *stats_get_thread(thread_id_t thread_id)196 {197 char name[SYSINFO_STATS_MAX_PATH];198 snprintf(name, SYSINFO_STATS_MAX_PATH, "system.threads.%" PRIu64, thread_id);199 200 size_t size = 0;201 stats_thread_t *stats_thread =202 (stats_thread_t *) sysinfo_get_data(name, &size);203 204 if (size != sizeof(stats_thread_t)) {205 if (stats_thread != NULL)206 free(stats_thread);207 return NULL;208 }209 210 return stats_thread;211 }212 213 186 /** Get exception statistics. 214 187 * -
uspace/lib/c/generic/thread.c
rc124c985 r38d8849 33 33 */ 34 34 35 #include <thread.h>36 35 #include <libc.h> 37 36 #include <stdbool.h> … … 159 158 } 160 159 161 /** Join thread.162 *163 * Currently not implemented.164 *165 * @param thread TID.166 *167 * @return Thread exit status.168 */169 errno_t thread_join(thread_id_t thread)170 {171 return 0;172 }173 174 160 /** Get current thread ID. 175 161 * -
uspace/lib/c/include/stats.h
rc124c985 r38d8849 37 37 38 38 #include <task.h> 39 #include <thread.h>40 39 #include <stdint.h> 41 40 #include <stdbool.h> … … 53 52 54 53 extern stats_thread_t *stats_get_threads(size_t *); 55 extern stats_thread_t *stats_get_thread(thread_id_t);56 54 57 55 extern stats_exc_t *stats_get_exceptions(size_t *); -
uspace/lib/pcut/tests/timeout.c
rc124c985 r38d8849 30 30 31 31 #ifdef __helenos__ 32 #include < thread.h>32 #include <fibril.h> 33 33 #else 34 34 #ifdef __unix … … 46 46 { 47 47 #ifdef __helenos__ 48 thread_sleep(sec);48 fibril_sleep(sec); 49 49 #else 50 50 #ifdef __unix -
uspace/lib/posix/include/posix/pthread.h
rc124c985 r38d8849 33 33 #define POSIX_PTHREAD_H_ 34 34 35 #include "libc/thread.h"36 35 #include "time.h" 37 36 38 typedef thread_id_tpthread_t;37 typedef void *pthread_t; 39 38 40 39 typedef struct { -
uspace/lib/posix/src/pthread/threads.c
rc124c985 r38d8849 36 36 #include "errno.h" 37 37 #include "posix/stdlib.h" 38 #include "libc/thread.h"38 #include <fibril.h> 39 39 #include "../internal/common.h" 40 40 41 41 pthread_t pthread_self(void) 42 42 { 43 return thread_get_id();43 return (pthread_t) fibril_get_id(); 44 44 } 45 45 -
uspace/lib/posix/src/unistd.c
rc124c985 r38d8849 45 45 46 46 #include "libc/task.h" 47 #include "libc/thread.h"48 47 #include "libc/stats.h" 49 48 #include "libc/malloc.h" … … 70 69 unsigned int sleep(unsigned int seconds) 71 70 { 72 return thread_sleep(seconds); 71 fibril_sleep(seconds); 72 return 0; 73 73 } 74 74
Note:
See TracChangeset
for help on using the changeset viewer.