Changeset aaa3c457 in mainline for kernel/generic/include


Ignore:
Timestamp:
2018-11-12T10:36:10Z (7 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a43dfcb
Parents:
3ce781f4 (diff), 6874bd2 (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.
git-author:
Jakub Jermář <jakub@…> (2018-11-12 10:36:10)
git-committer:
GitHub <noreply@…> (2018-11-12 10:36:10)
Message:

Merge pull request #56 from jermar/futexremoval

Remove kernel support for futexes in favor of waitq kobjects.

Location:
kernel/generic/include
Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/cap/cap.h

    r3ce781f4 raaa3c457  
    5555        KOBJECT_TYPE_IRQ,
    5656        KOBJECT_TYPE_PHONE,
     57        KOBJECT_TYPE_WAITQ,
    5758        KOBJECT_TYPE_MAX
    5859} kobject_type_t;
     
    6364struct irq;
    6465struct phone;
     66struct waitq;
    6567
    6668typedef struct kobject_ops {
     
    8890                struct irq *irq;
    8991                struct phone *phone;
     92                struct waitq *waitq;
    9093        };
    9194} kobject_t;
  • kernel/generic/include/proc/task.h

    r3ce781f4 raaa3c457  
    4242#include <synch/spinlock.h>
    4343#include <synch/mutex.h>
    44 #include <synch/futex.h>
    4544#include <adt/list.h>
    4645#include <adt/odict.h>
     
    128127        task_arch_t arch;
    129128
    130         /** Serializes access to futex_list.*/
    131         SPINLOCK_DECLARE(futex_list_lock);
    132         /** List of all futexes accesses by this task. */
    133         list_t futex_list;
    134 
    135129        /** Accumulated accounting. */
    136130        uint64_t ucycles;
  • kernel/generic/include/synch/syswaitq.h

    r3ce781f4 raaa3c457  
    11/*
    2  * Copyright (c) 2006 Jakub Jermar
     2 * Copyright (c) 2018 Jakub Jermar
    33 * All rights reserved.
    44 *
     
    3333 */
    3434
    35 #ifndef KERN_FUTEX_H_
    36 #define KERN_FUTEX_H_
     35#ifndef KERN_SYS_WAITQ_H_
     36#define KERN_SYS_WAITQ_H_
    3737
    3838#include <typedefs.h>
    39 #include <synch/waitq.h>
    40 #include <adt/hash_table.h>
     39#include <abi/cap.h>
    4140
    42 /** Kernel-side futex structure. */
    43 typedef struct {
    44         /** Physical address of the status variable. */
    45         uintptr_t paddr;
    46         /** Wait queue for threads waiting for futex availability. */
    47         waitq_t wq;
    48         /** Futex hash table link. */
    49         ht_link_t ht_link;
    50         /** Number of tasks that reference this futex. */
    51         size_t refcount;
    52 } futex_t;
     41extern void sys_waitq_init(void);
    5342
    54 extern void futex_init(void);
    55 extern sys_errno_t sys_futex_sleep(uintptr_t, uintptr_t);
    56 extern sys_errno_t sys_futex_wakeup(uintptr_t);
     43extern void sys_waitq_task_cleanup(void);
    5744
    58 extern void futex_task_cleanup(void);
    59 extern void futex_task_init(struct task *);
     45extern sys_errno_t sys_waitq_create(cap_waitq_handle_t *);
     46extern sys_errno_t sys_waitq_sleep(cap_waitq_handle_t, uint32_t, unsigned int);
     47extern sys_errno_t sys_waitq_wakeup(cap_waitq_handle_t);
     48extern sys_errno_t sys_waitq_destroy(cap_waitq_handle_t);
    6049
    6150#endif
  • kernel/generic/include/synch/waitq.h

    r3ce781f4 raaa3c457  
    4949 *
    5050 */
    51 typedef struct {
     51typedef struct waitq {
    5252        /** Lock protecting wait queue structure.
    5353         *
Note: See TracChangeset for help on using the changeset viewer.