Poster | Thread |
cdimauro
| |
Re: Some thoughts and questions about AmigaOS 4 Posted on 9-Dec-2012 17:30:41
| | [ #41 ] |
|
|
|
Elite Member |
Joined: 29-Oct-2012 Posts: 3621
From: Germany | | |
|
| @NutsAboutAmiga
You are wrong. Look at it: http://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodocs_2._guide/node007B.html
** $Filename: exec/ables.i $ ** $Release: 2.04 Includes, V37.4 $ ** $Revision: 36.6 $ ** $Date: 90/05/10 $ ** ** Task switch and interrupt control macros ** ** (C) Copyright 1985-1999 Amiga, Inc. ** All Rights Reserved **
[...]
;Prevent task switching (disables reschedule) FORBID MACRO ; [scratchReg],[NOFETCH] or ExecBase in A6! IFC '\1','' ;Case 1: Assume A6=ExecBase ADDQ.B #1,TDNestCnt(A6) MEXIT ENDC IFC '\2','NOFETCH' ;Case 2: Assume \1=ExecBase ADDQ.B #1,TDNestCnt(\1) MEXIT ENDC IFNC '\1','' ;Case 3: Use \1 as scratch MOVE.L 4,\1 ;Get ExecBase ADDQ.B #1,TDNestCnt(\1) MEXIT ENDC ENDM
It was perfectly legal to directly access TDNestCnt. Commodore provided even this macro for applications.
The same applies for C code, if I remember correctly.
This means that you cannot simply trap Forbid() system calls to implement SMP support (and may be AMP too, but it dipends on the implementation details), without carefully taking into account this. |
|
Status: Offline |
|
|
itix
| |
Re: Some thoughts and questions about AmigaOS 4 Posted on 9-Dec-2012 17:40:33
| | [ #42 ] |
|
|
|
Elite Member |
Joined: 22-Dec-2004 Posts: 3398
From: Freedom world | | |
|
| @NutsAboutAmiga
Quote:
Your are allowed to access system structures if you do it whit forbid() and premit(), the only problem is that some of structures might change and so its written in the header files.
|
Accessing system structures without Forbid()/Permit() pair is perfectly legal unless documented otherwise. Public structures cant change._________________ Amiga Developer Amiga 500, Efika, Mac Mini and PowerBook |
|
Status: Offline |
|
|
NutsAboutAmiga
| |
Re: Some thoughts and questions about AmigaOS 4 Posted on 9-Dec-2012 18:02:21
| | [ #43 ] |
|
|
|
Elite Member |
Joined: 9-Jun-2004 Posts: 12795
From: Norway | | |
|
| @cdimauro
Yes thats nasty, horror. I was assuming every forbid was called whit a LVO_ vector JMP.
MMU hit will be too expensive I think, an other approach might be to fix it in the JIT compiler.
By looking at what ADDQ.B does, if tries to add 1 to offset that equals TFNestCNT it might dangerous, you might wont to call a expection routine for this, to check if A* is ExecBase, it might give a performance hit but only on old 68k applications.
PowerPC native programs are called by interfaces anyway and so is not effected, by this horror. Last edited by NutsAboutAmiga on 09-Dec-2012 at 06:09 PM. Last edited by NutsAboutAmiga on 09-Dec-2012 at 06:04 PM.
_________________ http://lifeofliveforit.blogspot.no/ Facebook::LiveForIt Software for AmigaOS |
|
Status: Offline |
|
|
NutsAboutAmiga
| |
Re: Some thoughts and questions about AmigaOS 4 Posted on 9-Dec-2012 18:20:59
| | [ #44 ] |
|
|
|
Elite Member |
Joined: 9-Jun-2004 Posts: 12795
From: Norway | | |
|
| @itix
Quote:
Accessing system structures without Forbid()/Permit() pair is perfectly legal unless documented otherwise. |
Well how many applications does poke around in ExecBase anyway?
Any list that is public, has to be protected by forbid and permit, you never know when node will be added or deleted, node list, and while being edited the ln_Succ and ln_Pred might be wrong.
Simply because you never know from a application point of view when the task switch will happen, unless your in control of it, during critical periods of time.Last edited by NutsAboutAmiga on 09-Dec-2012 at 06:24 PM. Last edited by NutsAboutAmiga on 09-Dec-2012 at 06:24 PM. Last edited by NutsAboutAmiga on 09-Dec-2012 at 06:23 PM.
_________________ http://lifeofliveforit.blogspot.no/ Facebook::LiveForIt Software for AmigaOS |
|
Status: Offline |
|
|
cdimauro
| |
Re: Some thoughts and questions about AmigaOS 4 Posted on 9-Dec-2012 18:39:10
| | [ #45 ] |
|
|
|
Elite Member |
Joined: 29-Oct-2012 Posts: 3621
From: Germany | | |
|
| Quote:
NutsAboutAmiga wrote: @cdimauro
Yes thats nasty, horror. I was assuming every forbid was called whit a LVO_ vector JMP.
MMU hit will be too expensive I think, |
For sure. Quote:
an other approach might be to fix it in the JIT compiler.
By looking at what ADDQ.B does, if tries to add 1 to offset that equals TFNestCNT it might dangerous, you might wont to call a expection routine for this, to check if A* is ExecBase, it might give a performance hit but only on old 68k applications. |
You were assuming that all applications will use exactly the same instructions provided by Commodore, but it cannot be the only case.
Assembly wasn't the only language used to program, so similar macros or subroutines were provided archiving the same task, generating different instruction(s). Quote:
PowerPC native programs are called by interfaces anyway and so is not effected, by this horror. |
Are you sure? Once gained the correct interface, is there any possibility to access ExecBase structure? If so, an application may directly change TFNestCNT as well... |
|
Status: Offline |
|
|
NutsAboutAmiga
| |
Re: Some thoughts and questions about AmigaOS 4 Posted on 9-Dec-2012 19:09:37
| | [ #46 ] |
|
|
|
Elite Member |
Joined: 9-Jun-2004 Posts: 12795
From: Norway | | |
|
| @cdimauro
Quote:
Not rally, I do it for Basilisk II, on video emulation, so I can handel the endianness issue there per pixel instead of per frame, and works fine there, but It seams to be too big of hack to apply it every thing might access that ExecBase, it might be that visualization might provide the answers to the problem, IOMMU to mask over real memory, or maybe the MMU table can be changed quickly on the fly.
Building it in to the JIT compiler is also solution, it most likely no more complicated then emulation one or tree extra instructions.
Quote:
Are you sure? Once gained the correct interface, is there any possibility to access ExecBase structure? If so, an application may directly change TFNestCNT as well... |
At lest when your writing C code for AmigaOS4, it sounds funny that some one Is willing to complicate things by looking up ExecBase to access it there, when header files points to the interfaces.
It might hove ever be that some one wont to check TFNestCNT is set in a routine so you don't break forbid or some thing like, I can see the need to read it but not to set it.
There are no include files provided for assembler programing on AmigaOS4, if you like that you need to write them your self.Last edited by NutsAboutAmiga on 09-Dec-2012 at 07:56 PM. Last edited by NutsAboutAmiga on 09-Dec-2012 at 07:43 PM. Last edited by NutsAboutAmiga on 09-Dec-2012 at 07:16 PM. Last edited by NutsAboutAmiga on 09-Dec-2012 at 07:13 PM. Last edited by NutsAboutAmiga on 09-Dec-2012 at 07:12 PM.
_________________ http://lifeofliveforit.blogspot.no/ Facebook::LiveForIt Software for AmigaOS |
|
Status: Offline |
|
|
itix
| |
Re: Some thoughts and questions about AmigaOS 4 Posted on 9-Dec-2012 19:38:33
| | [ #47 ] |
|
|
|
Elite Member |
Joined: 22-Dec-2004 Posts: 3398
From: Freedom world | | |
|
| @NutsAboutAmiga
If you have to access public lists or data items (like window pointer or task pointers) not under your control you of course must protect access.
_________________ Amiga Developer Amiga 500, Efika, Mac Mini and PowerBook |
|
Status: Offline |
|
|
Franko
| |
Re: Some thoughts and questions about AmigaOS 4 Posted on 10-Dec-2012 16:02:33
| | [ #48 ] |
|
|
|
Elite Member |
Joined: 29-Jun-2010 Posts: 2809
From: Unknown | | |
|
| @ssolie
Quote:
ssolie wrote: @Arko It's Trevor Dickinson and not "Trevor Dick" and you bloody well know that. |
Strange how the man posts here as "TrevorDick" himself and obviously chose that username by himself as well and obviously doesn't have a problem with it...
Exmple... http://amigaworld.net/modules/newbb/viewtopic.php?topic_id=35809&forum=33&start=20&viewmode=flat&order=0#673078
So what's your problem or indeed your concern with someone using anothers chosen username and you attacking them because for some bizarre reason in your mind it's not ok to use the mans chosen username !!!_________________
|
|
Status: Offline |
|
|
SlayeR__
| |
Re: Some thoughts and questions about AmigaOS 4 Posted on 10-Dec-2012 16:10:51
| | [ #49 ] |
|
|
|
Cult Member |
Joined: 24-Dec-2002 Posts: 634
From: Unknown | | |
|
| @Franko
Quote:
Strange how the man posts here as "TrevorDick" himself and obviously chose that username by himself as well and obviously doesn't have a problem with it... |
And neither is Trevor Dick his username, its Trevordick as you already know or TrevorD that he uses himself. _________________
|
|
Status: Offline |
|
|
Franko
| |
Re: Some thoughts and questions about AmigaOS 4 Posted on 10-Dec-2012 16:28:21
| | [ #50 ] |
|
|
|
Elite Member |
Joined: 29-Jun-2010 Posts: 2809
From: Unknown | | |
|
| @SlayeR__
Quote:
SlayeR__ wrote: @Franko
Quote:
Strange how the man posts here as "TrevorDick" himself and obviously chose that username by himself as well and obviously doesn't have a problem with it... |
And neither is Trevor Dick his username, its Trevordick as you already know or TrevorD that he uses himself. |
Not sure if you need glasses or have trouble reading or were just to lazy to look but...
Clearly says "TrevorDick" exactly the way I spelt it in my post...
So pray tell if that is not his username and how it's spelt then who's account is that !!!
_________________
|
|
Status: Offline |
|
|
SlayeR__
| |
Re: Some thoughts and questions about AmigaOS 4 Posted on 10-Dec-2012 16:41:46
| | [ #51 ] |
|
|
|
Cult Member |
Joined: 24-Dec-2002 Posts: 634
From: Unknown | | |
|
| @Franko
Did you even notice that the quote you made in post #48 mentions Trever Dick and not Trevordick, which is what SSolie and i mentions. _________________
|
|
Status: Offline |
|
|
Franko
| |
Re: Some thoughts and questions about AmigaOS 4 Posted on 10-Dec-2012 16:51:35
| | [ #52 ] |
|
|
|
Elite Member |
Joined: 29-Jun-2010 Posts: 2809
From: Unknown | | |
|
| @SlayeR__
Quote:
SlayeR__ wrote: @Franko
Did you even notice that the quote you made in post #48 mentions Trever Dick and not Trevordick, which is what SSolie and i mentions. |
Big deal there's a space in there... are you now going to go through thousands of posts on this site and correct each and everything and everyone you consider has made a spelling mistake or used the wrong grammar...
If so you might want to start with your own post #49 where you said "its Trevordick" as you forgot to use a capital D in "dick" and you forgot the apostrophe in "It's"...
Which you wrongly claimed "I already know", seems I know the correct spelling a bit more than you do...
Anything else you want to post that you are wrong about so that I can correct you, I don't mind... honest... _________________
|
|
Status: Offline |
|
|
jorkany
| |
Re: Some thoughts and questions about AmigaOS 4 Posted on 10-Dec-2012 16:56:29
| | [ #53 ] |
|
|
|
Cult Member |
Joined: 1-May-2005 Posts: 920
From: Space Coast | | |
|
| @SlayeR__
Since you insist on taking this thread off-topic, maybe you'd like to explain exactly why you take issue with this? Trevor's username is TrevorDick, with or without a space it's clear that everyone knows who is being referred to. So what's the big deal?
@Franko, Quote:
If so you might want to start with your own post #49 where you said "its Trevordick" as you forgot to use a capital D in "dick" and you forgot the apostrophe in "It's"... |
Could be an OCD thing, but grammar cops abound on the Internet as I'm sure you're well aware...though how grammar could apply to a made-up username I have no idea.Last edited by jorkany on 10-Dec-2012 at 04:58 PM.
_________________ Here for the whimpering end |
|
Status: Offline |
|
|
SlayeR__
| |
Re: Some thoughts and questions about AmigaOS 4 Posted on 10-Dec-2012 17:07:55
| | [ #54 ] |
|
|
|
Cult Member |
Joined: 24-Dec-2002 Posts: 634
From: Unknown | | |
|
| @jorkany
Quote:
Since you insist on taking this thread off-topic, maybe you'd like to explain exactly why you take issue with this? Trevor's username is TrevorDick, with or without a space it's clear that everyone knows who is being referred to. So what's the big deal? |
Its his username on AW.net without the space, and its not his name with the space.
Since i responded to Franko i guess he started going OT and you insist even more by responding to me._________________
|
|
Status: Offline |
|
|
Franko
| |
Re: Some thoughts and questions about AmigaOS 4 Posted on 10-Dec-2012 17:10:19
| | [ #55 ] |
|
|
|
Elite Member |
Joined: 29-Jun-2010 Posts: 2809
From: Unknown | | |
|
| @jorkany
Quote:
jorkany wrote: @Franko, Quote:
If so you might want to start with your own post #49 where you said "its Trevordick" as you forgot to use a capital D in "dick" and you forgot the apostrophe in "It's"... |
Could be an OCD thing, but grammar cops abound on the Internet as I'm sure you're well aware...though how grammar could apply to a made-up username I have no idea. |
The grammar bit was referring to "Slayer_s" overly fussy standpoint on this topic (even though he couldn't even get right what he was talking about) and the fact for someone so overly fussy he missed out the apostrophe in "it's"...
It's a good job spelling mistakes and bad grammar is against the law or folk who's native language isn't English would be in big trouble, heck "NutsAboutAmiga" would get a life sentence for his use of "Whit" and "Templario" would be on death row..
Mind you some folk who's native language is English would be in deep doo dah too...
Ah wid probubly git hung, drawn an quartered fur minze... _________________
|
|
Status: Offline |
|
|
Franko
| |
Re: Some thoughts and questions about AmigaOS 4 Posted on 10-Dec-2012 17:14:03
| | [ #56 ] |
|
|
|
Elite Member |
Joined: 29-Jun-2010 Posts: 2809
From: Unknown | | |
|
| @SlayeR__
Quote:
SlayeR__ wrote: @jorkany
Since i responded to Franko i guess he started going OT and you insist even more by responding to me. |
As I was responding to ssolie in post # 17
http://amigaworld.net/modules/newbb/viewtopic.php?topic_id=36944&forum=2#690998
Then your guess was wrong (again) as by your own methods of working things out then he started going off topic first... _________________
|
|
Status: Offline |
|
|
terminills
| |
Re: Some thoughts and questions about AmigaOS 4 Posted on 10-Dec-2012 17:44:45
| | [ #57 ] |
|
|
|
AROS Core Developer |
Joined: 8-Mar-2003 Posts: 1472
From: Unknown | | |
|
| |
Status: Offline |
|
|
ChrisH
| |
Re: Some thoughts and questions about AmigaOS 4 Posted on 10-Dec-2012 18:49:54
| | [ #58 ] |
|
|
|
Elite Member |
Joined: 30-Jan-2005 Posts: 6679
From: Unknown | | |
|
| @SlayeR__ Quote:
Its his username on AW.net without the space, and its not his name with the space. |
Apart from lawyers debating trademarks, does the space (or lack thereof) really matter? I find it hard to imagine that anyone (apart from you) really cares...
... but in the end it's up to Trevor whether he objects to a space between "Trevor" & "Dick". If he doesn't (and I strongly suspect he won't) then it is a non-issue. Why not ask him? Could save you a lot of wasted effort...
_________________ Author of the PortablE programming language. It is pitch black. You are likely to be eaten by a grue... |
|
Status: Offline |
|
|
terminills
| |
Re: Some thoughts and questions about AmigaOS 4 Posted on 10-Dec-2012 19:12:16
| | [ #59 ] |
|
|
|
AROS Core Developer |
Joined: 8-Mar-2003 Posts: 1472
From: Unknown | | |
|
| @ChrisH
Quote:
. but in the end it's up to Trevor whether he objects to a space between "Trevor" & "Dick". If he doesn't (and I strongly suspect he won't) |
I would hope not as it's how he's signed his posts before. :)_________________ Support AROS sponsor a developer.
"AROS is prolly illegal ~ Evert Carton" intentionally quoted out of context for dramatic effect |
|
Status: Offline |
|
|
SlayeR__
| |
Re: Some thoughts and questions about AmigaOS 4 Posted on 10-Dec-2012 19:30:11
| | [ #60 ] |
|
|
|
Cult Member |
Joined: 24-Dec-2002 Posts: 634
From: Unknown | | |
|
| @ChrisH
This whole OT started with a post Franko made, i responded to that post, and yes the space matters in this discussion since that is what is being discussed.
The first post that SSolie made was about Trevors name and not his username, look for post 17.
_________________
|
|
Status: Offline |
|
|