OSDN Git Service

hw/mips: implement ITC Storage - P/V Sync and Try Views
authorLeon Alrae <leon.alrae@imgtec.com>
Fri, 25 Mar 2016 13:49:33 +0000 (13:49 +0000)
committerLeon Alrae <leon.alrae@imgtec.com>
Wed, 30 Mar 2016 08:14:00 +0000 (09:14 +0100)
commit40dc9dc3394d2796341aeda6cd14bac46ce24735
treef241256481fd9737a838498f4b6c7c46bdbf932b
parent4051089d61166e7b548ac4b62288a52312331f31
hw/mips: implement ITC Storage - P/V Sync and Try Views

P/V Synchronized and Try Views can be used to access Semaphore cells.
Load returns current value and post-decrements the value in the cell
(until it reaches zero). Stores increment the value (until it saturates
at 0xFFFF).

P/V Synchronized View causes the issuing thread to block on read if value
is 0. P/V Try View does not block the thread, it returns 0 in this case.

Cell's Empty and Full bits are not modified.

Trap bit (i.e. Gating Storage exceptions) not implemented.

Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
hw/misc/mips_itu.c