Changeset 9aa72b4 in mainline


Ignore:
Timestamp:
2006-03-22T22:27:44Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
281b607
Parents:
2802767
Message:

Basic futex. Prototype implementation.

Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r2802767 r9aa72b4  
    141141        generic/src/synch/semaphore.c \
    142142        generic/src/synch/waitq.c \
     143        generic/src/synch/futex.c \
    143144        generic/src/smp/ipi.c \
    144145        generic/src/ipc/ipc.c \
  • generic/include/syscall/syscall.h

    r2802767 r9aa72b4  
    3434        SYS_THREAD_CREATE,
    3535        SYS_THREAD_EXIT,
     36        SYS_FUTEX_SLEEP,
     37        SYS_FUTEX_WAKEUP,
    3638        SYS_MMAP,
    3739        SYS_MREMAP,
  • generic/src/main/main.c

    r2802767 r9aa72b4  
    5151#include <mm/slab.h>
    5252#include <synch/waitq.h>
     53#include <synch/futex.h>
    5354#include <arch/arch.h>
    5455#include <arch.h>
     
    6566
    6667config_t config;        /**< Global configuration structure. */
    67 init_t init = {0};  /**< Initial user-space tasks */
     68init_t init = {0};      /**< Initial user-space tasks */
    6869
    6970context_t ctx;
     
    144145        task_t *k;
    145146        thread_t *t;
     147        count_t i;
    146148       
    147149        the_initialize(THE);
     150
    148151        /*
    149152         * kconsole data structures must be initialized very early
     
    188191        task_init();
    189192        thread_init();
    190        
    191         count_t i;
     193        futex_init();
     194       
    192195        for (i = 0; i < init.cnt; i++)
    193196                printf("init[%d].addr=%P, init[%d].size=%d\n", i, init.tasks[i].addr, i, init.tasks[i].size);
    194197       
    195198        ipc_init();
     199
    196200        /*
    197201         * Create kernel task.
  • generic/src/syscall/syscall.c

    r2802767 r9aa72b4  
    3737#include <debug.h>
    3838#include <ipc/sysipc.h>
     39#include <synch/futex.h>
    3940
    4041static __native sys_io(int fd, const void * buf, size_t count) {
     
    7778        sys_thread_create,
    7879        sys_thread_exit,
     80        sys_futex_sleep,
     81        sys_futex_wakeup,
    7982        sys_mmap,
    8083        sys_mremap,
Note: See TracChangeset for help on using the changeset viewer.