Re: re-entrant function??????? ?
On Wed, 12 Jan 2005 02:42:29 +0000, Neil Kurzman wrote:
[color=blue]
>
>
> thesushant@redi ffmail.com wrote:
>[color=green]
>> hi,
>>
>> can anyone of C masters siting out there suggest any 1 example of
>> re-entrnt function just to show what is the significance of that
>> property and how we can exploit it ....
>>
>> sushant[/color]
>
> Look up the "tower of Honoi " The computer solution is very simple if
> recursion is used.
> recursive function are re-entrant.[/color]
Sometimes they are, but not always. Recursive functions call themselves
under very controlled circumstances. Reentrancy is a more general
principle than that.
[color=blue]
> Otherwise function used by multitasking, multithread, and interrupts
> may have to be re-entrant.
> since they may be paused in the middle and then call again.[/color]
Or maybe executed my multiple threads simultaneously.
Lawrence
On Wed, 12 Jan 2005 02:42:29 +0000, Neil Kurzman wrote:
[color=blue]
>
>
> thesushant@redi ffmail.com wrote:
>[color=green]
>> hi,
>>
>> can anyone of C masters siting out there suggest any 1 example of
>> re-entrnt function just to show what is the significance of that
>> property and how we can exploit it ....
>>
>> sushant[/color]
>
> Look up the "tower of Honoi " The computer solution is very simple if
> recursion is used.
> recursive function are re-entrant.[/color]
Sometimes they are, but not always. Recursive functions call themselves
under very controlled circumstances. Reentrancy is a more general
principle than that.
[color=blue]
> Otherwise function used by multitasking, multithread, and interrupts
> may have to be re-entrant.
> since they may be paused in the middle and then call again.[/color]
Or maybe executed my multiple threads simultaneously.
Lawrence
Comment