Changeset b52da8d7 in mainline for src/preempt/preemption.c


Ignore:
Timestamp:
2005-08-29T11:57:26Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c245372b
Parents:
229d5fc1
Message:

Add some comments to IA-32 src/boot/boot.S and src/smp.S.

Make the boot stack start on page boundary.
This is required by get_stack_base().

Define 'THE' macro.

Implement preemption_disable() and preemption_enable().

Add memory barrier macros.
IA-32 macros need support for older processors.
Non IA-32 macros are dummy.

Reduction of many #include paths.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/preempt/preemption.c

    r229d5fc1 rb52da8d7  
    2929#include <preemption.h>
    3030#include <arch.h>
    31 #include <arch/atomic.h>
     31#include <arch/asm.h>
    3232#include <arch/barrier.h>
     33#include <debug.h>
    3334
    3435void preemption_disable(void)
    3536{
     37        THE->preemption_disabled++;
     38        memory_barrier();
    3639}
    3740
    3841void preemption_enable(void)
    3942{
     43        ASSERT(THE->preemption_disabled);
     44        memory_barrier();
     45        THE->preemption_disabled--;
    4046}
Note: See TracChangeset for help on using the changeset viewer.