Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
87 user(s) are online (63 user(s) are browsing Forums)

Members: 0
Guests: 87

more...

Support us!

Headlines

Report message:*
 

Re: Memory protection and tasks/processes

Subject: Re: Memory protection and tasks/processes
by Capehill on 2021/3/7 11:35:08

@afxgroup

Without a complete and minimalistic example, people just keep on making random guesses.

EDIT:

#include <proto/exec.h>
#include <stdio.h>

int main()
{
    
struct SignalSemaphoreIExec->AllocSysObject(ASOT_SEMAPHORENULL);

    if (
s) {
        
puts("obtain");
        
IExec->ObtainSemaphore(s);
        
puts("release");
        
IExec->ReleaseSemaphore(s);
        
IExec->FreeSysObject(ASOT_SEMAPHOREs);
    }

    
puts("Free NULL");
    
IExec->FreeSysObject(ASOT_SEMAPHORENULL);

    return 
0;
}


Works for me.


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project