IT lexicon › Programming › Wimp_Poll

Wimp_Poll

Programming På svenska → Updated: 2026-11-09

The call every RISC OS program must make to find out what happened — and the only moment anyone else gets to run.

The RISC OS desktop runs on cooperative multitasking, and Wimp_Poll is where the cooperating happens. A program calls the SWI, the Window Manager switches to other tasks, and eventually returns with a reason code: 1 means a window needs redrawing, 6 a mouse click, 8 a key press, 17 and 18 messages from other programs. Code 0, the null event, means nothing happened at all.

A mask lets a program decline events it doesn't care about, and masking out null events lets the machine idle. A program that doesn't, and also never calls Wimp_Poll during a long calculation, freezes the entire desktop, mouse pointer included. The Wimp_PollIdle variant lets a task sleep until a given time. That one careless loop can stop everything is the price of a system that was fast in 1989 precisely because it trusted everyone.

← Back to the lexicon