🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.acorn.tech
Article #355

Re: RISC-OS apps in modules

#355
From: Edward Nevill
Date: Fri, 16 Oct 1992 10:27
54 lines
2311 bytes
In article <gilbertd.718962306@p4.cs.man.ac.uk> gilbertd@p4.cs.man.ac.uk (David Alan Gilbert) writes:

>In <1992Oct12.161759.2143@infodev.cam.ac.uk> idg10@cl.cam.ac.uk (I.D. Griffiths) writes:
>
><stuff about cmgh and the c compiler and problems etc. >
>
>>*logon from within a task window under NFS causes the machine to hang.  (yup!
>>NFS is written in C, even some of the low level bits...)  So basically if two
>>tasks written in C are running at once, the machine will hang.  Obviously this
>>only applies to SVC mode C, since user mode apps obviously seem to work.
>
>Oh! Thats why Desktop C is incompatible with NFS!
>Doesn't that meen you could never write a filing system
>using cmhg - since everything using it would fall over?
>(Ah yes....NFS!)

No, this occurs because of a bug in the Internet module which is nothing to
do with it being written in C / Assembler or any other language.

You can run multiple C tasks modules simultaneously. Each CMHG entry point
saves the old values of the static data relocations, installs its static
data relocations, calls the entry point and restores the old static data
relocations. 

>What limitations arise from this - i.e. I have written
>a module in C and it works OK.  It provides a *command,
>and a number of SWI's.  Both of these seem to work OK
>in a task window - why should they - especialy the star command
>which prints out quite a bit of information.

No limitations whatsoever.

>Does it meen I cant call a SWI in another C module, even if I preserve
>R14_svc?  If so, would it fail if it wrote any data to (say) an NFS
>mounted file?  - Or is this completely different?

You can call SWIs in other C modules. If you are using _kernel_swi you
do not need to worry about saving R14_svc. _kernel_swi does this before
calling the SWI.

Edward (enevill@acorn.co.uk)

....
....
....
....
....
....
....
....
....
....
....
....
Technical Details
Message-ID: <19515@acorn.co.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!acorn!enevill
References: <gilbertd.718962306@p4.cs.man.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!acorn!enevill
From: enevill@acorn.co.uk (Edward Nevill)
Newsgroups: comp.sys.acorn.tech
Subject: Re: RISC-OS apps in modules
Message-ID: <19515@acorn.co.uk>
Date: 16 Oct 92 10:27:51 GMT
References: <gilbertd.718962306@p4.cs.man.ac.uk>
Sender: enevill@acorn.co.uk
Organization: Acorn Computers Ltd, Cambridge, England
Lines: 54