VirtualBox

Changeset 1816 in vbox for trunk/src/VBox/Runtime/r0drv


Ignore:
Timestamp:
Mar 29, 2007 6:59:35 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
19999
Message:

moved magics to a common header to avoid duplicating the same defines all over the place.

Location:
trunk/src/VBox/Runtime/r0drv
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/alloc-r0drv.h

    r289 r1816  
    2525#include <iprt/cdefs.h>
    2626#include <iprt/types.h>
     27#include "internal/magics.h"
    2728
    2829__BEGIN_DECLS
     
    4344} RTMEMHDR, *PRTMEMHDR;
    4445
    45 /** Magic number for heap blocks. (Edgar Allan Poe) */
    46 #define RTMEMHDR_MAGIC      0x18090119
    4746
    4847/** @name RTMEMHDR::fFlags.
  • trunk/src/VBox/Runtime/r0drv/darwin/semaphore-r0drv-darwin.cpp

    r1189 r1816  
    2626*******************************************************************************/
    2727#include "the-darwin-kernel.h"
     28
    2829#include <iprt/semaphore.h>
    2930#include <iprt/alloc.h>
     
    3132#include <iprt/asm.h>
    3233#include <iprt/err.h>
     34
     35#include "internal/magics.h"
    3336
    3437
     
    5356} RTSEMEVENTINTERNAL, *PRTSEMEVENTINTERNAL;
    5457
    55 /** Magic for the Darwin event semaphore structure. (Neil Gaiman) */
    56 #define RTSEMEVENT_MAGIC 0x19601110
    57 
    5858
    5959/**
     
    7474} RTSEMEVENTMULTIINTERNAL, *PRTSEMEVENTMULTIINTERNAL;
    7575
    76 /** Magic for the Darwin multiple release event semaphore structure. (Isaac Asimov) */
    77 #define RTSEMEVENTMULTI_MAGIC 0x19200102
    78 
    7976
    8077#if 0 /** @todo */
     
    9087} RTSEMMUTEXINTERNAL, *PRTSEMMUTEXINTERNAL;
    9188
    92 /** Magic for the Darwin mutex semaphore structure. (Douglas Adams) */
    93 #define RTSEMMUTEX_MAGIC 0x19520311
    9489#endif
    9590
     
    106101} RTSEMFASTMUTEXINTERNAL, *PRTSEMFASTMUTEXINTERNAL;
    107102
    108 /** Magic value for RTSEMFASTMUTEXINTERNAL::u32Magic (John Ronald Reuel Tolkien). */
    109 #define RTSEMFASTMUTEX_MAGIC    0x18920102
    110103
    111104
  • trunk/src/VBox/Runtime/r0drv/darwin/spinlock-r0drv-darwin.cpp

    r1 r1816  
    3131#include <iprt/asm.h>
    3232
     33#include "internal/magics.h"
     34
    3335
    3436/*******************************************************************************
     
    4547    lck_spin_t         *pSpinLock;
    4648} RTSPINLOCKINTERNAL, *PRTSPINLOCKINTERNAL;
    47 
    48 /** Magic value for RTSPINLOCKINTERNAL::u32Magic. (Terry Pratchett) */
    49 #define RTSPINLOCK_MAGIC    0x19480428
    5049
    5150
  • trunk/src/VBox/Runtime/r0drv/linux/semaphore-r0drv-linux.c

    r1 r1816  
    3232#include <iprt/err.h>
    3333
     34#include "internal/magics.h"
     35
    3436
    3537/*******************************************************************************
     
    4850    wait_queue_head_t   Head;
    4951} RTSEMEVENTINTERNAL, *PRTSEMEVENTINTERNAL;
    50 
    51 /** Magic for the Linux event semaphore structure. (Neil Gaiman) */
    52 #define RTSEMEVENT_MAGIC 0x19601110
    5352
    5453
     
    6867} RTSEMMUTEXINTERNAL, *PRTSEMMUTEXINTERNAL;
    6968
    70 /** Magic for the Linux mutex semaphore structure. (Douglas Adams) */
    71 #define RTSEMMUTEX_MAGIC 0x19520311
    72 
    7369
    7470/**
     
    8278    struct semaphore    Semaphore;
    8379} RTSEMFASTMUTEXINTERNAL, *PRTSEMFASTMUTEXINTERNAL;
    84 
    85 /** Magic value for RTSEMFASTMUTEXINTERNAL::u32Magic (John Ronald Reuel Tolkien). */
    86 #define RTSEMFASTMUTEX_MAGIC    0x18920102
    8780
    8881
  • trunk/src/VBox/Runtime/r0drv/linux/spinlock-r0drv-linux.c

    r1 r1816  
    2525*******************************************************************************/
    2626#include "the-linux-kernel.h"
     27
    2728#include <iprt/spinlock.h>
    2829#include <iprt/err.h>
     
    3031#include <iprt/assert.h>
    3132#include <iprt/asm.h>
     33#include "internal/magics.h"
    3234
    33 #include <linux/spinlock.h>
     35#include <linux/spinlock.h> /** @todo why is this here and not in the-linux-kernel.h? */
     36
    3437
    3538/*******************************************************************************
     
    5053#endif
    5154} RTSPINLOCKINTERNAL, *PRTSPINLOCKINTERNAL;
    52 
    53 /** Magic value for RTSPINLOCKINTERNAL::u32Magic. (Terry Pratchett) */
    54 #define RTSPINLOCK_MAGIC    0x19480428
    5555
    5656
  • trunk/src/VBox/Runtime/r0drv/nt/semaphore-r0drv-nt.cpp

    r1 r1816  
    3232#include <iprt/err.h>
    3333
     34#include "internal/magics.h"
     35
    3436
    3537/*******************************************************************************
     
    4749} RTSEMEVENTINTERNAL, *PRTSEMEVENTINTERNAL;
    4850
    49 /** Magic for the NT event semaphore structure. (Neil Gaiman) */
    50 #define RTSEMEVENT_MAGIC 0x19601110
    5151
    5252
     
    6767} RTSEMMUTEXINTERNAL, *PRTSEMMUTEXINTERNAL;
    6868
    69 /** Magic for the NT mutex semaphore structure. (Douglas Adams) */
    70 #define RTSEMMUTEX_MAGIC 0x19520311
    7169
    7270
     
    8280} RTSEMFASTMUTEXINTERNAL, *PRTSEMFASTMUTEXINTERNAL;
    8381
    84 /** Magic value for RTSEMFASTMUTEXINTERNAL::u32Magic (John Ronald Reuel Tolkien). */
    85 #define RTSEMFASTMUTEX_MAGIC    0x18920102
    8682
    8783
  • trunk/src/VBox/Runtime/r0drv/nt/spinlock-r0drv-nt.cpp

    r1 r1816  
    2525*******************************************************************************/
    2626#include "the-nt-kernel.h"
     27
    2728#include <iprt/spinlock.h>
    2829#include <iprt/err.h>
     
    3031#include <iprt/assert.h>
    3132#include <iprt/asm.h>
     33
     34#include "internal/magics.h"
    3235
    3336
     
    4548    KSPIN_LOCK          Spinlock;
    4649} RTSPINLOCKINTERNAL, *PRTSPINLOCKINTERNAL;
    47 
    48 /** Magic value for RTSPINLOCKINTERNAL::u32Magic. (Terry Pratchett) */
    49 #define RTSPINLOCK_MAGIC    0x19480428
    5050
    5151
  • trunk/src/VBox/Runtime/r0drv/os2/semevent-r0drv-os2.cpp

    r1191 r1816  
    4141#include <iprt/err.h>
    4242
     43#include "internal/magics.h"
     44
    4345
    4446/*******************************************************************************
     
    6163    SpinLock_t          Spinlock;
    6264} RTSEMEVENTINTERNAL, *PRTSEMEVENTINTERNAL;
    63 
    64 /** Magic for the OS/2 event semaphore structure. (Neil Gaiman) */
    65 #define RTSEMEVENT_MAGIC 0x19601110
    6665
    6766
  • trunk/src/VBox/Runtime/r0drv/os2/semeventmulti-r0drv-os2.cpp

    r1191 r1816  
    4040#include <iprt/assert.h>
    4141#include <iprt/err.h>
     42#include "internal/magics.h"
    4243
    4344
     
    6162    SpinLock_t          Spinlock;
    6263} RTSEMEVENTMULTIINTERNAL, *PRTSEMEVENTMULTIINTERNAL;
    63 
    64 /** Magic for the OS/2 multiple release event semaphore structure. (Isaac Asimov) */
    65 #define RTSEMEVENTMULTI_MAGIC 0x19200102
    6664
    6765
  • trunk/src/VBox/Runtime/r0drv/os2/semfastmutex-r0drv-os2.cpp

    r1191 r1816  
    4040#include <iprt/asm.h>
    4141
     42#include "internal/magics.h"
     43
    4244
    4345/*******************************************************************************
     
    5456    MutexLock_t         Mtx;
    5557} RTSEMFASTMUTEXINTERNAL, *PRTSEMFASTMUTEXINTERNAL;
    56 
    57 /** Magic value for RTSEMFASTMUTEXINTERNAL::u32Magic (John Ronald Reuel Tolkien). */
    58 #define RTSEMFASTMUTEX_MAGIC        0x18920102
    59 /** Dead magic value. */
    60 #define RTSEMFASTMUTEX_MAGIC_DEAD   0x0000000 /// @todo
    6158
    6259
  • trunk/src/VBox/Runtime/r0drv/os2/spinlock-r0drv-os2.cpp

    r1191 r1816  
    4040#include <iprt/asm.h>
    4141
     42#include "internal/magics.h"
     43
    4244
    4345/*******************************************************************************
     
    5456    SpinLock_t          Spinlock;
    5557} RTSPINLOCKINTERNAL, *PRTSPINLOCKINTERNAL;
    56 
    57 /** Magic value for RTSPINLOCKINTERNAL::u32Magic. (Terry Pratchett) */
    58 #define RTSPINLOCK_MAGIC    0x19480428
    59 
    6058
    6159
  • trunk/src/VBox/Runtime/r0drv/os2/timer-r0drv-os2.cpp

    r1191 r1816  
    4242#include <iprt/assert.h>
    4343#include <iprt/alloc.h>
     44
     45#include "internal/magics.h"
    4446
    4547
     
    7981} RTTIMER;
    8082
    81 /** Magic number for timer handles. (Jared Mason Diamond) */
    82 #define RTTIMER_MAGIC       0x19370910
    83 
    8483
    8584/*******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette