Mail Archives: djgpp-workers/2003/01/16/01:33:30
On Wed, 15 Jan 2003, Ben Decker wrote:
> The sigaltstack structure is defined as:
> struct sigaltstack {
> char *ss_sp;
> int ss_size;
> int ss_flags;
> };
> (would this go in signal.h? ss_size may better be difined as size_t?)
> It is a bit confusing, because the structure is similar to stack_t (I notice DJGPP doesn't
> have that either). The values seem normally defined as follows:
> ss_sp = malloc(SIGSTKSZ)
> ss_size = SIGSTKSZ;
> ss_flags = 0;
> SIGSTKSZ is "the number of bytes/chars that would be used to cover the usual case
> when allocating an alternate stack area."
>
> For Linux it was defined as:
> #define MINSIGSTKSZ 131027 /* min. stack size for sigaltstack() */
> #define SIGSTKSZ 262144 /* default stack size for sigaltstack() */
Please also look in the relevant Posix and OpenUnix standards, not only
on GNU/Linux. We would like to be Posix-compliant as much as possible.
> GNU platforms seem to store the sigaltstack() routine itself in a separate 'sigaltstack.c'.
> Would this also be suitable for DJGPP?
Yes. But please note that we generally prefer not to exceed the 8+3
limitations of DOS file names. So I'd suggest to consider something
like `sigaltst.c' or maybe `sigastk.c'.
Thanks for working on this.
- Raw text -