Question & Answer
Question
How to Calculate semaphore ids and release them in DCS?
Cause
Answer
The following solution will indicate how to calculate a semaphore key for a
program in DCS.
The formula which is used to calculate the semaphore
key is :
RetVal = LineNo * 100000 + Offset ;
LineNo ==> Line
Value from $DCS_BASE/files/config/whse.map file for that Whse .
Offset ==>
semaphore values that are given in the list above are Offset values for this
formula.
Hexadecimal Equivalent of Semaphore for program =
Hexadecimal equivalent of (RetVal)
You will need to get the key
corresponding to the program. Each program uses a different semaphore and the
key used can be got from code. Some typical programs, Semaphore keys and their
values are given below:
Program Name Semaphore Key
----------------------- ------------------------
intbu056
208
intbu079 200
intbu081 201
intbu083 205
intbu087 206
intbu088
202
intbu091 203
intbu093 204
intbu101 207
intbu103
42
mahainterface 111
mahapurg 106
wh120 83
wh124 86
wh126
94
wh129 50
wh132 92
wh142 98
wh143 88
wh145 58
wh217
99
wh220 100
wh251 95
wh307 97
wh311 97
wh741 96
wh742
52
wh743 54
wh744 56
wh856 84
wh857 86
whbu010 01207
whbu022
101
whbu023 102
whbu024 103
whbu025 104
whbu026 105
whbu027
107
whbu028 110
whbu089 108
whbu202 91
whbu298 80
whbu372
60
whbu500 82
who07 76
whfbu64 90
whbu501 00761
whbu502
08096
whbu010 has a semaphore key whose value was 01207. Therefore
the number in ( ) corresponding to whbu010 is (linevalue * 100000) + 01207 =
12201207
get the hex equivalent of the above number(u can use the
calculator).
To find the semaphore number for the hex equivalet
do:
ipcs | grep <hex. eqvt.>
Check if the program is running. If
not release the semaphore with the command:
ipcrm -s <Semaphore
#>
e.g.
ipcrm -s 98442.
Repeat for other programs that are not
running but register this error.
Submit the program again, if needed.
Historical Number
PRI49626
Product Synonym
[<p><b>]Fact[</b><p>];
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21534243