Changeset 38d8849 in mainline for uspace/lib/c


Ignore:
Timestamp:
2018-07-16T15:58:51Z (7 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
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)
Message:

Privatize <thread.h>.

Location:
uspace/lib/c
Files:
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/arm32/include/libarch/fibril.h

    rc124c985 r38d8849  
    3939#include <types/common.h>
    4040#include <align.h>
    41 #include <thread.h>
    4241#include <libarch/fibril_context.h>
    4342
  • uspace/lib/c/generic/fibril.c

    rc124c985 r38d8849  
    3636#include <adt/list.h>
    3737#include <fibril.h>
    38 #include <thread.h>
    3938#include <stack.h>
    4039#include <tls.h>
     
    4948#include <async.h>
    5049
     50#include "private/thread.h"
    5151#include "private/fibril.h"
    5252
  • uspace/lib/c/generic/private/thread.h

    rc124c985 r38d8849  
    3636#define LIBC_PRIVATE_THREAD_H_
    3737
     38#include <time.h>
    3839#include <abi/proc/uarg.h>
     40#include <libarch/thread.h>
     41#include <abi/proc/thread.h>
    3942
    4043extern void __thread_entry(void);
    4144extern void __thread_main(uspace_arg_t *);
     45
     46extern errno_t thread_create(void (*)(void *), void *, const char *, thread_id_t *);
     47extern void thread_exit(int) __attribute__((noreturn));
     48extern void thread_detach(thread_id_t);
     49extern thread_id_t thread_get_id(void);
     50extern int thread_usleep(useconds_t);
     51extern unsigned int thread_sleep(unsigned int);
    4252
    4353#endif
  • uspace/lib/c/generic/rcu.c

    rc124c985 r38d8849  
    8080#include <assert.h>
    8181#include <time.h>
    82 #include <thread.h>
    8382
    8483#include "private/fibril.h"
  • uspace/lib/c/generic/stats.c

    rc124c985 r38d8849  
    184184}
    185185
    186 /** Get single thread statistics
    187  *
    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 freed
    192  *         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 
    213186/** Get exception statistics.
    214187 *
  • uspace/lib/c/generic/thread.c

    rc124c985 r38d8849  
    3333 */
    3434
    35 #include <thread.h>
    3635#include <libc.h>
    3736#include <stdbool.h>
     
    159158}
    160159
    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 
    174160/** Get current thread ID.
    175161 *
  • uspace/lib/c/include/stats.h

    rc124c985 r38d8849  
    3737
    3838#include <task.h>
    39 #include <thread.h>
    4039#include <stdint.h>
    4140#include <stdbool.h>
     
    5352
    5453extern stats_thread_t *stats_get_threads(size_t *);
    55 extern stats_thread_t *stats_get_thread(thread_id_t);
    5654
    5755extern stats_exc_t *stats_get_exceptions(size_t *);
Note: See TracChangeset for help on using the changeset viewer.