[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Identify current process in exception handler?
2 okt 2011 kl. 18:04 skrev Adam Kłobukowski:
>> True, that could be one way of doing it. As long as I don't build more code in allocated memory that could work, I guess. It also means I can rule out exceptions invoked by OS components (VDI, kernel, BIOS etc).
>>
>> It's the best one so far. It seems I can get the PID of the running process, but my impression is that this won't help my case since I can't determine if the call was actually made by the process itself or by some subsystem.
>
> If you do that from inside of FreeMiNT kernel, I think it could be possible to get find it somewhere…
Exceptions share memory space / privileges with the kernel, so provided there are useful (and somewhat public) structures for it, I'd prefer to do it with some aid from the kernel. If that doesn't exist, there may be a point in doing what m0n0 proposed, since it clearly states who made the call.
> Care to elaborate what do you want to ahieve? Sounds like a nasty hack yo're trying to pull…
I want to virtualize stuff, and execute a process in virtual supervisor mode. Of course it's a hack, like everything else on this platform. Some stuff just can't be implemented in a clean manner, since we lack the functionality in the OS for it :)
-- PeP