Changeset 7ce9284 in mainline for include


Ignore:
Timestamp:
2005-08-30T17:41:19Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b45aa23
Parents:
10caad0
Message:

Dump implementation of THREAD, TASK and CPU.
Implement preemption-safe versions of THREAD, TASK and CPU using THE.
Get rid of CPU_ID_ARCH on all architectures.
Get rid of write_dr0() and read_dr0() on IA-32.
Get rid of cpu_private_data and cpu_private_data_t.

Location:
include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/arch.h

    r10caad0 r7ce9284  
    4040#include <proc/task.h>
    4141
    42 /*
    43  * NOTE:
    44  * CPU, THREAD and TASK are not preemption-safe.
    45  * Provisions must be made to prevent preemption prior
    46  * to using these macros. Simple cpu_priority_high()
    47  * call will suffice.
    48  */
    49 #define CPU             (&cpus[CPU_ID_ARCH])
    50 #define THREAD          (cpu_private_data[CPU_ID_ARCH].thread)
    51 #define TASK            (cpu_private_data[CPU_ID_ARCH].task)
     42#define CPU             THE->cpu
     43#define THREAD          THE->thread
     44#define TASK            THE->task
    5245
    5346/*
  • include/cpu.h

    r10caad0 r7ce9284  
    7272};
    7373
    74 /*
    75  * read/write by associated CPU
    76  * read only by other CPUs
    77  */
    78 struct cpu_private_data {
    79         thread_t *thread;
    80         task_t *task;
    81 };
    82 
    83 extern cpu_private_data_t *cpu_private_data;
    8474extern cpu_t *cpus;
    8575
Note: See TracChangeset for help on using the changeset viewer.