[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Super() bug



Alan Hourihane wrote:
Done.

Great ! Thanks.

So, the new rule for safe user programs is:

- To go to supervisor mode, use as usual:
oldssp = Super(0);

- To go back to user mode, use:
SuperToUser(oldssp); /* Instead of the classic Super(oldssp) */

If you want to support the old MiNTLibs in your programs, you can do the following:

#include <mint/osbind.h>
#ifndef SuperToUser
#define SuperToUser(ptr) Super(ptr)
#endif

Then use SuperToUser() unconditionally.

--
Vincent Rivière