Changeset dc747e3 in mainline for arch/ia32


Ignore:
Timestamp:
2005-12-15T10:27:59Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7dd2561
Parents:
3fc03fd
Message:

Add SPINLOCK_DECLARE and SPINLOCK_INITIALIZE macros.
SPINLOCK_DECLARE is to be used instead of direct spinlock_t declarations
in dynamically allocated structures on which spinlock_initialize() is called after
their creation.
SPINLOCK_INITIALIZE is to be used instead of direct spinlock_t declarations
of global spinlocks. It declares and initializes the spinlock.
Moreover, both macros are empty on UP so that -Wall warnings about unused structures
get supressed.

Location:
arch/ia32/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/drivers/ega.c

    r3fc03fd rdc747e3  
    4343 */
    4444
    45 static spinlock_t egalock;
     45SPINLOCK_INITIALIZE(egalock);
    4646static __u32 ega_cursor;
    4747
  • arch/ia32/src/drivers/i8042.c

    r3fc03fd rdc747e3  
    6464#define LOCKED_CAPSLOCK         (1<<0)
    6565
    66 static spinlock_t keylock;              /**< keylock protects keyflags and lockflags. */
     66SPINLOCK_INITIALIZE(keylock);           /**< keylock protects keyflags and lockflags. */
    6767static volatile int keyflags;           /**< Tracking of multiple keypresses. */
    6868static volatile int lockflags;          /**< Tracking of multiple keys lockings. */
     
    244244        exc_register(VECTOR_KBD, "i8042_interrupt", i8042_interrupt);
    245245        trap_virtual_enable_irqs(1<<IRQ_KBD);
    246         spinlock_initialize(&keylock, "i8042_lock");
    247246        chardev_initialize("i8042_kbd", &kbrd, &ops);
    248247        stdin = &kbrd;
  • arch/ia32/src/mm/page.c

    r3fc03fd rdc747e3  
    3636#include <arch/interrupt.h>
    3737#include <arch/asm.h>
    38 #include <synch/spinlock.h>
    3938#include <debug.h>
    4039#include <memstr.h>
Note: See TracChangeset for help on using the changeset viewer.