Pointers

      TCB_SemInfo
    Locations
      Multiple, in user storage.
    VM Owner
      Multipl user storage owners.

    Format

    ┌─────────────────────────┬────────┬────────┬────────┬────────────────────────────────────────┐│Field Name               │Off     │Length  │Type    │Description                             │
    ├─────────────────────────┼────────┼────────┼────────┼────────────────────────────────────────┤
    │RamSemStruc              │+0      │4       │S       │Ram Semaphore                           │
    ├─────────────────────────┼────────┼────────┼────────┼────────────────────────────────────────┤
    │RamSemOwner              │+0      │1       │B       │Ownership flag                          │
    ├─────────────────────────┼────────┼────────┼────────┼────────────────────────────────────────┤
    │RamSemFlag               │+1      │1       │B       │Ram Semaphore flag bit field            │
    ├─────────────────────────┼────────┼────────┼────────┼────────────────────────────────────────┤
    │RamSemID                 │+2      │2       │W       │RamSem Block/Run ID low word            │
    └─────────────────────────┴────────┴────────┴────────┴────────────────────────────────────────┘
    

    RamSemFlag definitions

    ┌──────────────────┬─────┬────────────────────────────────────────┐
    │name              │value│description                             │
    ├──────────────────┼─────┼────────────────────────────────────────┤
    │RAMSEM_WAITING    │0x01 │a thread is waiting on the sem          │
    ├──────────────────┼─────┼────────────────────────────────────────┤
    │RAMSEM_MUXWAITING │0x02 │a thread is muxwaiting on the sem       │
    └──────────────────┴─────┴────────────────────────────────────────┘
    

    Notes:

    The high-order 4 bit of the RamSemFlag are used as an extended owner field (to cater for more than 512 threads).

    Only kernel code sets the RamSemOwner field to a thread slot number. Ring 3 RamSems have 0xff value for an owned RamSem


    [Back] [Next]