Changeset 81e55099 in mainline


Ignore:
Timestamp:
2006-03-17T19:56:16Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0a862b65
Parents:
e5a1f82f
Message:

Fix uspace threads for ia64.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • init/init.c

    re5a1f82f r81e55099  
    3838void utest(void *arg)
    3939{
    40 //      printf("Uspace thread started.\n");
     40        printf("Uspace thread started.\n");
    4141        for (;;)
    4242                ;
  • libc/generic/thread.c

    re5a1f82f r81e55099  
    3333#include <kernel/proc/uarg.h>
    3434
     35/** Main thread function.
     36 *
     37 * This function is called from __thread_entry() and is used
     38 * to call the thread's implementing function and perform cleanup
     39 * and exit when thread returns back. Do not call this function
     40 * directly.
     41 *
     42 * @param uarg Pointer to userspace argument structure.
     43 */
    3544void thread_main(uspace_arg_t *uarg)
    3645{
     
    4150}
    4251
     52/** Create userspace thread.
     53 *
     54 * This function creates new userspace thread and allocates userspace
     55 * stack and userspace argument structure for it.
     56 *
     57 * @param function Function implementing the thread.
     58 * @param arg Argument to be passed to thread.
     59 * @param name Symbolic name of the thread.
     60 *
     61 * @param TID of the new thread on success or -1 on failure.
     62 */
    4363int thread_create(void (* function)(void *), void *arg, char *name)
    4464{
     
    5575                return -1;
    5676        }
     77       
    5778        uarg->uspace_entry = (void *) FADDR(__thread_entry);
    5879        uarg->uspace_stack = (void *) stack;
    59         uarg->uspace_thread_function = (void *) FADDR(function);
     80        uarg->uspace_thread_function = function;
    6081        uarg->uspace_thread_arg = arg;
    6182        uarg->uspace_uarg = uarg;
     
    6485}
    6586
     87/** Terminate current thread.
     88 *
     89 * @param stat Exit status. Currently not used.
     90 */
    6691void thread_exit(int status)
    6792{
Note: See TracChangeset for help on using the changeset viewer.