Page 1 of 1

Error in http://wiki.amigaos.net/wiki/Exec_Tasks

PostPosted: Thu Oct 06, 2016 1:46 pm
by Kamelito
This page is marked as "This page is not yet fully updated to AmigaOS 4.x some of the information contained here may not be applicable in part or totally."
I understand that it can be not applicable but let's do it anyway.
I mainly looked at the code not the content.

Step to reproduce :
Goto : http://wiki.amigaos.net/wiki/Exec_Tasks
Look for the example "simpletask.c"

1) Search for line "struct Task *task = CreateTaskTags("SimpleTask", 0 , simpletask, STACK_SIZE"
since this create an invalid conversion from 'void (*)()' to 'const void*'
I would cast like that "struct Task *task = IExec->CreateTaskTags("SimpleTask", 0 , (void*) simpletask, STACK_SIZE, TAG_END); //tell me if I'm wrong

2) Search for "IEXec->DeleteTask(task);" // notice the big X in IEXec
it should be "IExec->DeleteTask(task);"

3) In the autodoc we have " struct Task *task = CreateTask(CONST_STRPTR name, int32 pri, CONST_APTR initPC, uint32 stackSize, CONST struct TagItem *tagList);
in the wiki "CreateTaskTags(CONST_STRPTR name, int32 priority, APTR initialPC, uint32 stacksize, ...);"
Kamelito

Re: Error in http://wiki.amigaos.net/wiki/Exec_Tasks

PostPosted: Sat Oct 08, 2016 4:57 pm
by ssolie
Fixed.

Re: Error in http://wiki.amigaos.net/wiki/Exec_Tasks

PostPosted: Sun Oct 09, 2016 8:22 am
by Kamelito
ssolie wrote:Fixed.


Still missing an "IExec->" in this line "struct Task *task = CreateTaskTags("SimpleTask", 0 , (CONST_APTR)simpletask, STACK_SIZE, TAG_END);

Kamelito

Re: Error in http://wiki.amigaos.net/wiki/Exec_Tasks

PostPosted: Mon Oct 24, 2016 9:17 pm
by Kamelito
verified fixed

Kamelito