Commit 2e9ed6c0 authored by Dan Ellis's avatar Dan Ellis
Browse files

- Fixed resetting of timeout

  - Fixed sleep and timeout ioctls
  - Fixed initialisation from special field

Detail:
  OS_RemoveTicker was being called with the wrong handle so not being
removed.  This was causing timeout behaviour to work incorrectly.

  Sleep and Timeout ioctls weren't reading their reason fields from the ioctl
block.  They now do, and work!

  Defaults weren't being set correctly from the special field.

Admin:
  Tested on a RiscPC, and STB.

  Timeouts cause an error and so because of the fileswitch interface will not
actually return bytes read during that request.  To perform a managed timeout
in which bytes can be counted during timeout, non-blocking calls must be
made.  However, bytes have still been copied to the destination buffer
(although the caller won't know how many).

  There are still 'issues' with special fields.  However, they appear to work
correctly on the Dual Serial interface.



Version 0.59. Tagged as 'DeviceFS-0_59'
parent 3a86b4f5
......@@ -11,14 +11,14 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.58"
Module_Version SETA 58
Module_MajorVersion SETS "0.59"
Module_Version SETA 59
Module_MinorVersion SETS ""
Module_Date SETS "03 Sep 2001"
Module_ApplicationDate2 SETS "03-Sep-01"
Module_ApplicationDate4 SETS "03-Sep-2001"
Module_Date SETS "24 Sep 2001"
Module_ApplicationDate2 SETS "24-Sep-01"
Module_ApplicationDate4 SETS "24-Sep-2001"
Module_ComponentName SETS "DeviceFS"
Module_ComponentPath SETS "RiscOS/Sources/HWSupport/DeviceFS"
Module_FullVersion SETS "0.58"
Module_HelpVersion SETS "0.58 (03 Sep 2001)"
Module_FullVersion SETS "0.59"
Module_HelpVersion SETS "0.59 (24 Sep 2001)"
END
/* (0.58)
/* (0.59)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 0.58
#define Module_MajorVersion_CMHG 0.59
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 03 Sep 2001
#define Module_Date_CMHG 24 Sep 2001
#define Module_MajorVersion "0.58"
#define Module_Version 58
#define Module_MajorVersion "0.59"
#define Module_Version 59
#define Module_MinorVersion ""
#define Module_Date "03 Sep 2001"
#define Module_Date "24 Sep 2001"
#define Module_ApplicationDate2 "03-Sep-01"
#define Module_ApplicationDate4 "03-Sep-2001"
#define Module_ApplicationDate2 "24-Sep-01"
#define Module_ApplicationDate4 "24-Sep-2001"
#define Module_ComponentName "DeviceFS"
#define Module_ComponentPath "RiscOS/Sources/HWSupport/DeviceFS"
#define Module_FullVersion "0.58"
#define Module_HelpVersion "0.58 (03 Sep 2001)"
#define Module_LibraryVersionInfo "0:58"
#define Module_FullVersion "0.59"
#define Module_HelpVersion "0.59 (24 Sep 2001)"
#define Module_LibraryVersionInfo "0:59"
......@@ -331,7 +331,7 @@ object_subdevice * -1 ; object type returned by findobject if
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
debug SETL true
debug SETL false
hostvdu SETL false
debug_file SETS "<DevFSDebug>"
......@@ -339,11 +339,14 @@ debug_file SETS "<DevFSDebug>"
GBLL debugtransmitchar
GBLL debuggbpb
GBLL debugregisterdev
GBLL debugspecial
debug_module SETL false
debugfs SETL false :LAND: debug
debuggbpb SETL false :LAND: debug
debugtransmitchar SETL true :LAND: debug
debugregisterdev SETL true :LAND: debug
debugregisterdev SETL false :LAND: debug
debugenumdir SETL true :LAND: debug
debugspecial SETL true :LAND: debug
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
......@@ -2026,6 +2029,7 @@ MakeErrorEntry
[ debug ; if a debugging version, then include debugging code
InsertNDRDebugRoutines
XDebugIt_WriteC * &4ba82
]
LTORG
......
......@@ -71,7 +71,7 @@ checkescape Entry
timeout
Entry "r0"
MOV r0, #ff_TimedOut
STR r0, [r12, #file_PollWord]
STR r0, [r12, #file_PollWord] ; r12 was fr when registered
EXIT
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......@@ -102,7 +102,7 @@ sleep
BEQ %f90
ADR r0, timeout
MOV r1, r12
MOV r1, fr
SWI XOS_RemoveTickerEvent
EXIT
10
......@@ -1130,6 +1130,7 @@ ioctl_miscop_nonblock
ioctl_miscop_sleep
ROUT
LDR r0, [r2, #0] ; load ioctl reason codes and flags
MOV fr, r1 ; -> file record
LDR r1, [fr, #file_PollWord]
......@@ -1139,9 +1140,8 @@ ioctl_miscop_sleep
LDR r3, [r2, #4] ; load ioctl data word
CMP r3, #0
MOV r1, #ff_DontSleep ; sleeping disabled
CMP r3, #1
MOV r1, #ff_WakeUp ; sleeping enabled
MOVEQ r1, #ff_DontSleep ; sleeping disabled
MOVNE r1, #ff_WakeUp ; sleeping enabled
STR r1, [fr, #file_PollWord] ; write back
10
TST r0, #&40000000 ; test read flag
......@@ -1157,6 +1157,7 @@ ioctl_miscop_sleep
ioctl_miscop_timeout
ROUT
LDR r0, [r2, #0] ; load ioctl reason codes and flags
MOV fr, r1 ; -> file record
LDR r1, [fr, #file_Timeout]
......@@ -1794,6 +1795,8 @@ file_enumdir Entry "r0-r2, r5-r7, dr, pr"
ADDS r3, lr, #0 ; number of items returned (V cleared!)
EXIT ; and then return quickly
LTORG
; in: R1 -> wildcarded pathname
; out: R1 -> pathname, with "$." removed
......@@ -1893,7 +1896,7 @@ gbpb_get Entry "r0-r3, fr, r9, pr"
[ TWSleep
BEQ %FT20
LDR r1, [fr, #file_PollWord]
TEQ r1, #1
TEQ r1, #ff_DontSleep
BEQ %BT10
MOV r1, #ff_Sleeping ; reset pollword
......@@ -2254,24 +2257,21 @@ HandleSpecial Entry "r0-r6"
10
LDR r0, sp_block ; maybe set the non-blocking bit
TEQ r0, #1
BNE %20
LDR r0, [fr, #file_Flags]
ORR r0, r0, #ff_NonBlocking
ORRNE r0, r0, #ff_NonBlocking
BICEQ r0, r0, #ff_NonBlocking
STR r0, [fr, #file_Flags]
[ TWSleep
20
LDR r0, sp_sleep ; maybe set the sleeping word
TEQ r0, #1
BNE %30
MOV r0, #ff_Sleeping
MOVEQ r0, #ff_Sleeping
MOVNE r0, #ff_DontSleep
STR r0, [fr, #file_PollWord]
30
LDR r0, sp_timeout ; set the timeout for sleeping
TEQ r0, r5
MOVEQ r0, #0
STR r0, [fr, #file_Timeout]
|
20
]
ADD r6, r6, #sp_size
LDR r0, [pr, #parent_Validation]
......
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