home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / vms / 21614 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  2.7 KB

  1. Xref: sparky comp.os.vms:21614 vmsnet.sources.games:493
  2. Newsgroups: comp.os.vms,vmsnet.sources.games
  3. Path: sparky!uunet!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!jsue
  4. From: jsue@ncsa.uiuc.edu (Jeffrey L. Sue)
  5. Subject: Re: "Beat the Buzzer" Game?
  6. References:  <1993Jan20.122713.84@iwsd01.itwol.bhp.com.au>
  7. Message-ID: <C17GJy.Brv@news.cso.uiuc.edu>
  8. Originator: jsue@troon.ncsa.uiuc.edu
  9. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  10. Organization: The Dow Chemical Company
  11. Date: Thu, 21 Jan 1993 13:09:33 GMT
  12. Lines: 43
  13.  
  14.  
  15. In article <1993Jan20.122713.84@iwsd01.itwol.bhp.com.au>, webosk@iwsd01.itwol.bhp.com.au writes:
  16. |> Any ideas for a "beat the buzzer" game to make a training class more
  17. |> interesting? There will be around 8 users in the same group with VT100/220
  18. |> terminals and OPER privilege. I have trialled a program using $BRKTHRU to
  19. |> send messages to my terminal, which works ok although occasionally some
  20. |> messages get lost if they all arrive in quick succession.
  21. |> 
  22. |> I would like ideas to achieve the following:
  23. |> - a program which is easily configurable (at runtime) to send messages to
  24. |>   my terminal, and *only* my terminal (there will be other users on the
  25. |>   system).
  26. |> - a way of disabling nuisance messages until I am ready to receive them,
  27. |>   and to prevent a user sending multiple messages by holding his finger on
  28. |>   the button.
  29. |> - ensuring that the first person to press his button really *is* the first
  30. |>   to get through to my terminal.
  31. |>   
  32. |> Are there better methods than using $BRKTHRU (e.g. Common Event Flags and
  33. |> Global Sections)?
  34.  
  35. Ken,  to insure that only the first person gets thru, you could use $ENQ &
  36. $DEQ system services in your program.  Have only the person who actually
  37. is "granted" the lock send the $BRKTHRU message.  You can prevent people
  38. from sending messages when not ready by holding the lock yourself until you're
  39. ready.  If you don't want to use $BRKTHRU, you could have your program que
  40. a lock with a 'blocking ast' such that when someone queues a lock while
  41. you're blocking it, the ast routine would execute to allow you to $DEQ your
  42. lock, allowing the other person to get it.  You'd immediately queue up another
  43. lock on the same resource.  The other person would, after being granted the
  44. lock, $DEQ that lock but deposit information into the lock-value-block that
  45. allows you to determine who that person is.  After his/her lock is $DEQd you'd
  46. get the lock back and then read the value in the lock-value-block to determine
  47. who it was.
  48.  
  49. There are some example programs on DSNlink for working with $ENQ & $DEQ
  50. as well as some programs I've seen out on the Internet.
  51.  
  52. Good luck.
  53. -- 
  54. -----
  55. Jeff Sue   
  56.  - All opinions are mine -       (and you can't have any, nya nya nya)
  57.