Re: [ql-users] THING questions
I Wrote: Wolfgang Lenerz writes: 1 - What is a Forced Free? TH_FRFRE is an OS supplied piece of code - don't touch it. TH_FREE is the code the thing writer supplies for a forced free (i.e. the job ownning the thing is removed). Not quite. TH_FREE is called for freeing the Thing normally, ie detatching a User from the Thing. However TH_FFREE - the Force Free routine, is needed when the Thing is to be removed in its entirety, eg when a job owning the memory space the Thing resides in is removed.You would have to supply such a routine if, for example, such a Thing contained a task linked to one of the Task lists. This routine is called when sms.zthg (Zap Thing) is executed. Ah yes. There is ambiguity here. I didnt live long in the sin of unjustified self-satisfaction: The moment my mail was irrevocably dispatched doubt descended like a brick, so Ive now gone and checked the manual ;) You are right AFA TH_FRFRE is concerned and I was wrong to mix up TH_FFREE with TH_REMOV :( The FREE-type routines relate to the Usage blocks while REMOV relates to the actual Thing. Zap is another term for force-remove. (But force-removal implies force-freeing.) The documentation is rather grainy (and perhaps in some cases wrong?) You really need a debugger to understand it. The concepts of Freeing, Removing and Zapping are not always easily untangled. I dont want to speculate in public on what I think I mean to avoid causing general confusion (and personal embarrassment) I have written a number of different Things in the past and thought I had it figured (Im sure I did!) I would however welcome some clarification by a pundit. Ditto re the wee matter I raised a month ago, or so, about parameter passing to Extension Things. Some light on that subject too would be much appreciated. Per
Re: [ql-users] THING questions
On 16 Apr 2002, at 11:15, Timothy Swenson wrote: (things) Hi, just a few small answers that may point you in the right direction: 1 - What is a Forced Free? I know that you FREE a THING when an application stops using it, but I can't find an explanation for FORCED FREE. Forced free is when the job owning the thing is removed. A thing could be set up in such a way that the linkage block is not stored in the common heap, but within the memory area of a job. When that job disapperas, so will the thing. Hence a routine to make sure that all other jobs using this thing will also disappear - that is forced free. 2 - What is a Forced Zap? The TT docs talk about ZAP and use the term FORCED ZAP in defining the THING table. It looks like a FORCED ZAP is just another word for ZAP. Is this correct? Sorry, I wan't able to find where it mentiones a forced zap. A zap is normally the removal of a thing. You can force remove a thing. 3 - Pointer to close routine vs. Pointer to code In the THING table, TH_FRFRE is defined as a Pointer to close routine for Forced Free, and TH_FFREE is defined as a Pointer to code to Force Free a THING. What's the difference between the close routine and code for Forced Free. Would these two pointers point to the same code or are they two unique pieces of code that do two different operations? To me it looks like the two pointers are redudant. TH_FRFRE is an OS supplied piece of code - don't touch it. TH_FREE is the code the thing writer supplies for a forced free (i.e. the job ownning the thing is removed). 4 - How long is a THING name? TH_NAME in the THING table does not seem to have a definition of how long it should be. It is defined as a QDOS string which has a terminating character? Is there any limitation on size? Th_name is defined as a string - hence the usual length word followed by the name itself (ha -so we KNOW the length of a piece of string!). There is no limit on the length other than that imposed by using a length word. (is a 32K long name long enough?) 5 - THING Header I'm guessing that the THING Header (as defined by TT) is part of the THING code itself (as pointed to by TH_THING) and not part of the THING table. yes. If so, is the header the first bit of code in the THING? It probably isn't code, but it is to where TH_thing points. The header is just an area of memory containing some information about the thing itself - it doesn't contain any (executable) code. Hopefully someone will know the answers to these questions and take the time to enlighten me. I hope I have succedded. Wolfgang
Re: [ql-users] THING questions
Wolfgang Lenerz writes: 1 - What is a Forced Free? TH_FRFRE is an OS supplied piece of code - don't touch it. TH_FREE is the code the thing writer supplies for a forced free (i.e. the job ownning the thing is removed). Not quite. TH_FREE is called for freeing the Thing normally, ie detatching a User from the Thing. However TH_FFREE - the Force Free routine, is needed when the Thing is to be removed in its entirety, eg when a job owning the memory space the Thing resides in is removed.You would have to supply such a routine if, for example, such a Thing contained a task linked to one of the Task lists. This routine is called when sms.zthg (Zap Thing) is executed. Per
Re: [ql-users] THING questions
Thanks Wolgang and Per. The pieces of the puzzle are coming together. I'll document what I sort of understand and then make it available for others to tell me how wrong I was (and give me the right answer). Tim Swenson ___ Free Domain Name Registration with Web Hosting at Lanset Communications. 56k Dialup, Web Design, and Colocation at http://www.lanset.net
Re: [ql-users] THING questions
On 16 Apr 2002, at 11:15, Timothy Swenson wrote: 1 - What is a Forced Free? I know that you FREE a THING when an application stops using it, but I can't find an explanation for FORCED FREE. Forced free is when the job owning the thing is removed. A thing could be set up in such a way that the linkage block is not stored in the common heap, but within the memory area of a job. When that job disapperas, so will the thing. Hence a routine to make sure that all other jobs using this thing will also disappear - that is forced free. This sounds a lot like a ZAP (removing the THING and all Jobs on it's USAGE list). Is there a situation when a Forced Free would apply versus a Zap? 2 - What is a Forced Zap? The TT docs talk about ZAP and use the term FORCED ZAP in defining the THING table. It looks like a FORCED ZAP is just another word for ZAP. Is this correct? Sorry, I wan't able to find where it mentiones a forced zap. A zap is normally the removal of a thing. You can force remove a thing. The online THING documentation mentionens Forced Zap but is changed in the SMSQ/E docs to thing owner is removed. I should have caught this. 3 - Pointer to close routine vs. Pointer to code In the THING table, TH_FRFRE is defined as a Pointer to close routine for Forced Free, and TH_FFREE is defined as a Pointer to code to Force Free a THING. What's the difference between the close routine and code for Forced Free. Would these two pointers point to the same code or are they two unique pieces of code that do two different operations? To me it looks like the two pointers are redudant. TH_FRFRE is an OS supplied piece of code - don't touch it. TH_FREE is the code the thing writer supplies for a forced free (i.e. the job ownning the thing is removed). The statement in the SMSQ/E docs just above the definition of the THING table states: Items from TH_THING onwards (inclusive) must be filled in by the initialization code... This leads me to the conclusion that the fields TH_NXTTH, TH_USAGE, TH_FRFRE, TH_FRZAP are all filed in by the system and the user does not need to worry about them. Tim Swenson ___ Free Domain Name Registration with Web Hosting at Lanset Communications. 56k Dialup, Web Design, and Colocation at http://www.lanset.net
[ql-users] THING questions
I find that documenting a new subject helps me learn that subject. So, to better understand THINGs, I'm working on some THING documentation aimed at the general user. I'm reading the THING documentation from TT and the THING articles by Jochen. I've run into a number of terms and issues that I don't quite understand. I thought I would ask the list to see if I can get these questions resolved. 1 - What is a Forced Free? I know that you FREE a THING when an application stops using it, but I can't find an explanation for FORCED FREE. 2 - What is a Forced Zap? The TT docs talk about ZAP and use the term FORCED ZAP in defining the THING table. It looks like a FORCED ZAP is just another word for ZAP. Is this correct? 3 - Pointer to close routine vs. Pointer to code In the THING table, TH_FRFRE is defined as a Pointer to close routine for Forced Free, and TH_FFREE is defined as a Pointer to code to Force Free a THING. What's the difference between the close routine and code for Forced Free. Would these two pointers point to the same code or are they two unique pieces of code that do two different operations? To me it looks like the two pointers are redudant. 4 - How long is a THING name? TH_NAME in the THING table does not seem to have a definition of how long it should be. It is defined as a QDOS string which has a terminating character? Is there any limitation on size? 5 - THING Header I'm guessing that the THING Header (as defined by TT) is part of the THING code itself (as pointed to by TH_THING) and not part of the THING table. If so, is the header the first bit of code in the THING? Hopefully someone will know the answers to these questions and take the time to enlighten me. Thanks, Tim Swenson ___ Free Domain Name Registration with Web Hosting at Lanset Communications. 56k Dialup, Web Design, and Colocation at http://www.lanset.net
Re: [ql-users] THING questions
At 02:15 ìì 16/4/2002, Timothy Swenson wrote: snipped questions Tim Swenson IIRC all these are explained in the QDOS/SMS Reference Manual... I'll look into it and tell you Phoebus
Re: [ql-users] THING questions
IIRC all these are explained in the QDOS/SMS Reference Manual I have not looked there, so I'll have to check my copy. Now as for the explanation being clear, I'll have to see. The QDOS/SMS Reference Manual was aimed clearly at the Assembly programmer and seems to make some assumptions about the knowledge of it's audience. Tim ___ Free Domain Name Registration with Web Hosting at Lanset Communications. 56k Dialup, Web Design, and Colocation at http://www.lanset.net