Commit b09c7ea0 authored by Dan Ellis's avatar Dan Ellis
Browse files

Made UpCall 6 work with pollwords.

  UpCall 6 is documented as accepting a pollword which can be scanned for
being non zero to return control to the process requesting to sleep.  This
was not being used within the taskwindow module, there being a comment where
it would have been used suggesting that this would give the taskwindow too
high a priority.  What this means is that if given a pollword that is already
nonzero, the task would receive so many polls as to really make the desktop
juddery.  The solution is that if the pollword is non-zero on entry,
Wimp_Null is unmasked rather than passing the pollword.

  This means that UpCall 6 can be used either as a yield, to say 'let other
tasks have some CPU now' (by passing a pollword known to contain nonzero) or
as sleep to say 'wake me up when the pollword becomes non zero, and don't
consume any CPU time until then' (by passing a pollword that will only become
nonzero upon the occurance of a specific event).

  Tested on RPC.

Version 0.65. Tagged as 'TaskWindow-0_65'
parent 70ba5ce3
......@@ -11,14 +11,14 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.64"
Module_Version SETA 64
Module_MajorVersion SETS "0.65"
Module_Version SETA 65
Module_MinorVersion SETS ""
Module_Date SETS "14 May 2001"
Module_ApplicationDate2 SETS "14-May-01"
Module_ApplicationDate4 SETS "14-May-2001"
Module_Date SETS "15 May 2001"
Module_ApplicationDate2 SETS "15-May-01"
Module_ApplicationDate4 SETS "15-May-2001"
Module_ComponentName SETS "TaskWindow"
Module_ComponentPath SETS "RiscOS/Sources/Desktop/TaskWindow"
Module_FullVersion SETS "0.64"
Module_HelpVersion SETS "0.64 (14 May 2001)"
Module_FullVersion SETS "0.65"
Module_HelpVersion SETS "0.65 (15 May 2001)"
/* (0.64)
/* (0.65)
* This file is automatically maintained by srccommit, do not edit manually.
#define Module_MajorVersion_CMHG 0.64
#define Module_MajorVersion_CMHG 0.65
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 14 May 2001
#define Module_Date_CMHG 15 May 2001
#define Module_MajorVersion "0.64"
#define Module_Version 64
#define Module_MajorVersion "0.65"
#define Module_Version 65
#define Module_MinorVersion ""
#define Module_Date "14 May 2001"
#define Module_Date "15 May 2001"
#define Module_ApplicationDate2 "14-May-01"
#define Module_ApplicationDate4 "14-May-2001"
#define Module_ApplicationDate2 "15-May-01"
#define Module_ApplicationDate4 "15-May-2001"
#define Module_ComponentName "TaskWindow"
#define Module_ComponentPath "RiscOS/Sources/Desktop/TaskWindow"
#define Module_FullVersion "0.64"
#define Module_HelpVersion "0.64 (14 May 2001)"
#define Module_FullVersion "0.65"
#define Module_HelpVersion "0.65 (15 May 2001)"
......@@ -2989,9 +2989,16 @@ MyUpCallV ROUT
; [VecSaveRegs+4] = R1 on entry (Poll word address)
MOV r0, #0 ; pollword_enable ; poll word events are too high priority
LDR r3, VecSaveRegs+4 ; R3 -> poll word
STR r3, PollWord
TEQ r3, #0 ; this is a yield if pollword is zero,
MOVEQ r0, #1
LDRNE r0, [r3] ; or contents are already nonzero,
TEQ r0, #0 ; else its a sleep
15 MOVNE r0, #0
MOVEQ r0, #pollword_enable ; pollword_enable
ORREQ r0, r0, #null_bit ; mask nulls
BL PollWimpFn ; poll the wimp, dealing with events
MOV r14, #0
STR r14, PollWord
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment