realbasic-plugins
[Top] [All Lists]

Re: #pragma StackOverflowChecking

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: #pragma StackOverflowChecking
From: Jonathan Johnson <jonj at realsoftware dot com>
Date: Thu, 28 Sep 2006 10:01:57 -0500
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <1hmceyl dot 14j0qepijyoy2M%support at monkeybreadsoftware dot de> <24B79370-AFC8-4EF6-BE1D-FDD06939AFBA at coficio dot com> <3A0F2297-C176-48C3-9328-6B2D8324D93A at elfdata dot com> <90637F6A-EB12-4236-8D9B-6810BE7B2DF5 at realsoftware dot com> <415C7E0E-053F-485A-B1DA-B58136D44409 at toomuchspace dot com>

On Sep 28, 2006, at 9:55 AM, Alexander Cohen wrote:


On 28-Sep-06, at 10:43 AM, Jonathan Johnson wrote:

On 27 Sep 2006, at 21:15, Alexander Cohen wrote:

Heres the thing. I am using pthreads in a plugin and it calls back into rb. I know, thats a no no but it does work if your carefull. When it calls into rb, i need to set stackOverflow checking to off. If i dont, i get a stackOverflow exception. Problem is, i need to put that pragma into every functions that is called within the thread. And here's the kicker... even the function that are within a plugin.

my question does make sense though. Compile time or not, rb has its own mechanisms for rb code pragmas and i need to access them in a plugin.

All pragmas in REALbasic operate on the current method only, not on a call-stack basis. This means that every method called from your plugin, and every method called from those methods, etc, must all have StackOverflowChecking turned off.

So how do i set that from within a plugin?

You can't. Pragmas affect how the compiler generates code. In this case, stack overflow checking at the beginning of the method asks the runtime if the current stack pointer has overflowed the stack. If the stackOverflowChecking is disabled with a pragma, the compiler doesn't generate that call. Because it is compiled in, there is no way to affect this at runtime.

-Jon


--
Jonathan Johnson
jonj at realsoftware dot com
REAL Software, Inc.


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>