I was asked to write code for consumer and producer threads accessing shared queue in an interview with the given primitives

ADDNEW.Process
PROCESS.SET
PROCESS.RESET
ENTER CS
EXIT CS
LOOP
EXIT LOOP
WAIT# PROCESS

... And what have you got so far?

createevent write
setevent write
if read
wait
enter cs
write
exit cs
sleep
reset

This what I told and he told it is incorrect