Changeset 235d31d in mainline for kernel/generic/include/arch.h


Ignore:
Timestamp:
2014-12-22T17:47:40Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8c7d5ad
Parents:
eae91e0 (diff), 759ea0d (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 the CHT pre-integration branch

This branch contains:

  • the merge of lp:~adam-hraska+lp/helenos/rcu, which brings:
  • a new preemptible kernel RCU variant called A-RCU,
  • a preemptible variant of Podzimek's non-preemptible kernel RCU and
  • a new variant of usersace RCU,
  • a new concurrent hash table (CHT) implementation based on RCU,
  • a deployment of CHT in kernel futex handling,
  • a deployment of the userspace RCU in the implementation of upgradable futexes,

all described in Adam Hraska's master thesis named Read-Copy-Update
for HelenOS, defended in 2013 at MFF UK; furthemore, the branch
fixes two synchronization bugs in condvars and waitq, respectively:

  • revid:adam.hraska+hos@gmail.com-20121116144921-3to9u1tn1sg07rg7
  • revid:adam.hraska+hos@gmail.com-20121116173623-km7gwtqixwudpe66
  • build fixes required to pass make check
  • overhaul of ia64 and sparc64 trap handling, to allow exc_dispatch() to be used now when the kernel is more picky about CPU state accounting
  • an important fix of the sparc64/sun4v preemptible trap handler
  • various other fixes of issues discovered on non-x86 architectures
File:
1 edited

Legend:

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

    reae91e0 r235d31d  
    3636#define KERN_ARCH_H_
    3737
    38 #include <arch/arch.h>
    39 #include <proc/thread.h>
    40 #include <proc/task.h>
    41 #include <mm/as.h>
     38#include <arch/arch.h>  /* arch_pre_main() */
     39#include <arch/asm.h>   /* get_stack_base() */
     40#include <config.h>
     41
    4242
    4343/*
     
    4949#define THE  ((the_t * )(get_stack_base()))
    5050
    51 #define CPU                  THE->cpu
    52 #define THREAD               THE->thread
    53 #define TASK                 THE->task
    54 #define AS                   THE->as
    55 #define PREEMPTION_DISABLED  THE->preemption_disabled
    5651#define MAGIC                UINT32_C(0xfacefeed)
    5752
     
    6257        ((THE->task) ? (THE->task->container) : (DEFAULT_CONTAINER))
    6358
     59/* Fwd decl. to avoid include hell. */
     60struct thread;
     61struct task;
     62struct cpu;
     63struct as;
     64
    6465/**
    6566 * For each possible kernel stack, structure
     
    6869 */
    6970typedef struct {
    70         size_t preemption_disabled;  /**< Preemption disabled counter. */
    71         thread_t *thread;            /**< Current thread. */
    72         task_t *task;                /**< Current task. */
    73         cpu_t *cpu;                  /**< Executing cpu. */
    74         as_t *as;                    /**< Current address space. */
    75         uint32_t magic;              /**< Magic value */
     71        size_t preemption;     /**< Preemption disabled counter and flag. */
     72#ifdef RCU_PREEMPT_A
     73        size_t rcu_nesting;    /**< RCU nesting count and flag. */
     74#endif
     75        struct thread *thread; /**< Current thread. */
     76        struct task *task;     /**< Current task. */
     77        struct cpu *cpu;       /**< Executing cpu. */
     78        struct as *as;         /**< Current address space. */
     79        uint32_t magic;        /**< Magic value */
    7680} the_t;
    7781
     
    9195extern void *arch_construct_function(fncptr_t *, void *, void *);
    9296
     97
    9398#endif
    9499
Note: See TracChangeset for help on using the changeset viewer.