Commit 919acf54 authored by Kevin Bracey's avatar Kevin Bracey
Browse files

tmpnam() would cause system crashes in version 5.06

Version 5.07. Tagged as 'RISC_OSLib-5_07'
parent 1fe019e6
......@@ -6,9 +6,9 @@
GBLS Module_MinorVersion
GBLS Module_Date
GBLS Module_FullVersion
Module_MajorVersion SETS "5.06"
Module_Version SETA 506
Module_MajorVersion SETS "5.07"
Module_Version SETA 507
Module_MinorVersion SETS ""
Module_Date SETS "09 May 2000"
Module_FullVersion SETS "5.06"
Module_Date SETS "10 May 2000"
Module_FullVersion SETS "5.07"
END
/* (5.06)
/* (5.07)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 5.06
#define Module_MajorVersion_CMHG 5.07
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 09 May 2000
#define Module_Date_CMHG 10 May 2000
#define Module_MajorVersion "5.06"
#define Module_Version 506
#define Module_MajorVersion "5.07"
#define Module_Version 507
#define Module_MinorVersion ""
#define Module_Date "09 May 2000"
#define Module_Date "10 May 2000"
#define Module_FullVersion "5.06"
#define Module_FullVersion "5.07"
......@@ -245,6 +245,8 @@ uwb_size # 0
]
; Don't corrupt a1-a4 in these two routines, please.
; __counter relies on it, for one.
|_kernel_irqs_on|
[ {CONFIG}=26
BICS pc, lr, #PSRIBit ; 32-bit OK - in {CONFIG}=26
......@@ -279,7 +281,7 @@ uwb_size # 0
|_kernel_client_is_module|
LoadStaticBase a1, ip
[ {CONFIG}=26
TST r14, #PSRSVCMode
TST r14, #PSRPrivileged
|
MRS ip, CPSR
TST ip, #PSR32Privileged
......@@ -3164,18 +3166,24 @@ open_messagefile
]
|__counter|
FunctionEntry "r0"
MOV a3, lr
[ {CONFIG}=26
MOV a2, pc
|
MRS a2, CPSR
]
SWI EnterSVC
LDR r0, =CLibCounter
LDR a4, =CLibCounter
BL |_kernel_irqs_off| ; Disable IRQs round update.
LDRB lr, [r0]
STR lr, [sp]
ADD lr, lr, #1
STRB lr, [r0]
BL |_kernel_irqs_on|
WritePSRc PSRUSRMode, r0
NOP
Return "r0"
LDRB a1, [a4]
ADD ip, a1, #1
STRB ip, [a4]
[ {CONFIG}=26
TEQP pc, a2 ; Restore mode and IRQs
|
MSR CPSR_c, a2 ; Restore mode and IRQs
]
Return ,LinkNotStacked,,a3
END
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