Changeset 371bd7d in mainline for kernel/generic/include/proc


Ignore:
Timestamp:
2010-03-27T09:22:17Z (16 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
36a75a2
Parents:
cd82bb1 (diff), eaf22d4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

Location:
kernel/generic/include/proc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/proc/program.h

    rcd82bb1 r371bd7d  
    3636#define KERN_PROGRAM_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939
    4040struct task;
     
    4545 * A program is an abstraction of a freshly created (not yet running)
    4646 * userspace task containing a main thread along with its userspace stack.
     47 *
    4748 */
    4849typedef struct program {
    49         struct task *task;              /**< Program task */
    50         struct thread *main_thread;     /**< Program main thread */
     50        struct task *task;           /**< Program task */
     51        struct thread *main_thread;  /**< Program main thread */
    5152} program_t;
    5253
    5354extern void *program_loader;
    5455
    55 extern void program_create(as_t *as, uintptr_t entry_addr, char *name,
    56     program_t *p);
    57 extern int program_create_from_image(void *image_addr, char *name,
    58     program_t *p);
    59 extern int program_create_loader(program_t *p, char *name);
    60 extern void program_ready(program_t *p);
     56extern int program_create(as_t *, uintptr_t, char *, program_t *);
     57extern int program_create_from_image(void *, char *, program_t *);
     58extern int program_create_loader(program_t *, char *);
     59extern void program_ready(program_t *);
    6160
    62 extern unative_t sys_program_spawn_loader(char *uspace_name, size_t name_len);
     61extern unative_t sys_program_spawn_loader(char *, size_t);
    6362
    6463#endif
  • kernel/generic/include/proc/scheduler.h

    rcd82bb1 r371bd7d  
    3737
    3838#include <synch/spinlock.h>
    39 #include <time/clock.h>         /* HZ */
     39#include <time/clock.h>
     40#include <typedefs.h>
    4041#include <atomic.h>
    4142#include <adt/list.h>
    4243
    43 #define RQ_COUNT                16
    44 #define NEEDS_RELINK_MAX        (HZ)
     44#define RQ_COUNT          16
     45#define NEEDS_RELINK_MAX  (HZ)
    4546
    4647/** Scheduler run queue structure. */
    4748typedef struct {
    4849        SPINLOCK_DECLARE(lock);
    49         link_t rq_head;         /**< List of ready threads. */
    50         size_t n;               /**< Number of threads in rq_ready. */
     50        link_t rq_head;          /**< List of ready threads. */
     51        size_t n;                /**< Number of threads in rq_ready. */
    5152} runq_t;
    5253
     
    6162
    6263/*
    63  * To be defined by architectures:
     64 * To be defined by architectures.
    6465 */
    6566extern void before_task_runs_arch(void);
  • kernel/generic/include/proc/task.h

    rcd82bb1 r371bd7d  
    5555#include <udebug/udebug.h>
    5656#include <ipc/kbox.h>
     57#include <mm/as.h>
    5758
    5859#define TASK_NAME_BUFLEN        20
     
    129130extern void task_init(void);
    130131extern void task_done(void);
    131 extern task_t *task_create(as_t *as, char *name);
     132extern task_t *task_create(as_t *as, const char *name);
    132133extern void task_destroy(task_t *t);
    133134extern task_t *task_find_by_id(task_id_t id);
  • kernel/generic/include/proc/thread.h

    rcd82bb1 r371bd7d  
    5252#define THREAD_NAME_BUFLEN      20
    5353
    54 extern char *thread_states[];
     54extern const char *thread_states[];
    5555
    5656/* Thread flags */
     
    225225
    226226extern void thread_init(void);
    227 extern thread_t *thread_create(void (* func)(void *), void *arg, task_t *task,
    228     int flags, char *name, bool uncounted);
    229 extern void thread_attach(thread_t *t, task_t *task);
    230 extern void thread_ready(thread_t *t);
     227extern thread_t *thread_create(void (*)(void *), void *, task_t *, int,
     228    const char *, bool);
     229extern void thread_attach(thread_t *, task_t *);
     230extern void thread_ready(thread_t *);
    231231extern void thread_exit(void) __attribute__((noreturn));
    232232
    233233#ifndef thread_create_arch
    234 extern void thread_create_arch(thread_t *t);
     234extern void thread_create_arch(thread_t *);
    235235#endif
    236236#ifndef thr_constructor_arch
    237 extern void thr_constructor_arch(thread_t *t);
     237extern void thr_constructor_arch(thread_t *);
    238238#endif
    239239#ifndef thr_destructor_arch
    240 extern void thr_destructor_arch(thread_t *t);
    241 #endif
    242 
    243 extern void thread_sleep(uint32_t sec);
    244 extern void thread_usleep(uint32_t usec);
     240extern void thr_destructor_arch(thread_t *);
     241#endif
     242
     243extern void thread_sleep(uint32_t);
     244extern void thread_usleep(uint32_t);
    245245
    246246#define thread_join(t) \
    247247        thread_join_timeout((t), SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE)
    248 extern int thread_join_timeout(thread_t *t, uint32_t usec, int flags);
    249 extern void thread_detach(thread_t *t);
    250 
    251 extern void thread_register_call_me(void (* call_me)(void *),
    252     void *call_me_with);
     248extern int thread_join_timeout(thread_t *, uint32_t, int);
     249extern void thread_detach(thread_t *);
     250
     251extern void thread_register_call_me(void (*)(void *), void *);
    253252extern void thread_print_list(void);
    254 extern void thread_destroy(thread_t *t);
     253extern void thread_destroy(thread_t *);
    255254extern void thread_update_accounting(void);
    256 extern bool thread_exists(thread_t *t);
     255extern bool thread_exists(thread_t *);
    257256
    258257/** Fpu context slab cache. */
     
    260259
    261260/* Thread syscall prototypes. */
    262 extern unative_t sys_thread_create(uspace_arg_t *uspace_uarg,
    263     char *uspace_name, size_t name_len, thread_id_t *uspace_thread_id);
    264 extern unative_t sys_thread_exit(int uspace_status);
    265 extern unative_t sys_thread_get_id(thread_id_t *uspace_thread_id);
     261extern unative_t sys_thread_create(uspace_arg_t *, char *, size_t,
     262    thread_id_t *);
     263extern unative_t sys_thread_exit(int);
     264extern unative_t sys_thread_get_id(thread_id_t *);
     265extern unative_t sys_thread_usleep(uint32_t);
    266266
    267267#endif
Note: See TracChangeset for help on using the changeset viewer.