VirtualBox

Changeset 3446 in kBuild


Ignore:
Timestamp:
Sep 10, 2020 8:48:14 PM (5 years ago)
Author:
bird
Message:

kash: mutex fix.

Location:
trunk/src/kash
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/shinstance.c

    r3444 r3446  
    108108
    109109
    110 
    111 /** Magic mutex value (final u64).
    112  * This is used to detect whether the mutex has been initialized or not,
    113  * allowing shmtx_delete to be called more than once without doing harm.
    114  * @internal */
    115 #define SHMTX_MAGIC        KU64_C(0x8888000019641018) /**< Charles Stross */
    116 /** Index into shmtx::au64 of the SHMTX_MAGIC value.
    117  * @internal */
    118 #define SHMTX_MAGIC_IDX    (sizeof(shmtx) / sizeof(KU64) - 1)
    119110
    120111int shmtx_init(shmtx *pmtx)
  • trunk/src/kash/shthread.h

    r3439 r3446  
    3030#include "shtypes.h"
    3131
    32 typedef struct shmtx
     32typedef union shmtx
    3333{
    3434    char b[64];
     
    3636    void *aptrs[64/sizeof(void *)];
    3737} shmtx;
     38
     39/** Magic mutex value (final u64).
     40 * This is used to detect whether the mutex has been initialized or not,
     41 * allowing shmtx_delete to be called more than once without doing harm.
     42 * @internal */
     43#define SHMTX_MAGIC        KU64_C(0x8888000019641018) /**< Charles Stross */
     44/** Index into shmtx::au64 of the SHMTX_MAGIC value.
     45 * @internal */
     46#define SHMTX_MAGIC_IDX    (sizeof(shmtx) / sizeof(KU64) - 1)
    3847
    3948typedef struct shmtxtmp { int i; } shmtxtmp;
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