On 30 Jan 2011, at 10:25, Adrian Ives wrote:

> I am in the process of rewriting the USBWiz driver to get around the
> problems with supervisor mode that I encountered last year.
> 
> 
> 
> The new driver spawns independent jobs to handle reads and writes
> asynchronously in the background (because it has to invoke serial IO).  I'm
> doing the work in QPC2 and I've encountered a problem with calls to
> MT.FRJOB.
> 
> 
> 
> This is the code that I'm using at the end of my USB_RD (and USB_WR) job:
> 
> 
> 
>                moveq  #mt.frjob,d0
> 
>                moveq  #me,d1
> 
>                moveq  #0,d3
> 
>                trap        #1                                           ;
> Remove ourselves!
> 
> 
> 
> The only problem is that it doesn't work!  It actually returns err.nc (Not
> Complete) and the job continues executing.  Calls to mt.susjb and mt.prior
> succeed (d0 is zero on return) but don't actually do what they should.
> 
> 
> 
> I'm beginning to think it's a QPC2 thing, but before I unpack the Aurora QL
> from its hermetically sealed casket in the garden shed, can anyone shed any
> light on the reasons why these traps should fail in this way?
> 
> 

mt.frjob may not work in supervisor mode. The manual (Dickens) says "this trap 
is not guaranteed atomic".

Could this be the problem?

George
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to