Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ stkexec(2) — DG/UX R4.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

csync(2)

memctl(2)

mmap(2)

mprotect(2)

stkprotect(2)



stkexec(2)                        SDK R4.11                       stkexec(2)


NAME
       stkexec - set stack memory access

SYNOPSIS
       int stkexec (state)
       int     state;

DESCRIPTION
       The DG/UX system provides alternative calls for setting stack memory
       access: stkexec(2), defined by the 88open Binary Compatibility
       Standard (BCS), revision 1.1A; and stkprotect(2), defined by the
       System V Release 4 Application Binary Interface (ABI): Motorola 88000
       Processor Supplement.  If your program must be BCS-compliant, use
       stkexec(2) as explained below. Otherwise, use stkprotect(2).

       The stkexec(2) call sets access for the stack and future extensions
       to it. The state parameter may be one of the following:

       0    sets stack permissions to read-write (MCT_DATA).

       1    sets stack permissions to read-write-execute (MCT_RWX).

       Use of stkexec(2) is limited to BCS-compliant platforms that support
       MCT_RWX. Use sysconf(2) with the _SC_RWX_SUPPORT parameter to find
       out whether this support is present.

       Programs that execute stack memory should do the following:

       ·    Set the state of the stack to MCT_RWX.

       ·    After the  modification and prior to execution, notify the
            system to allow for synchronization of hardware cache and memory
            contents. Use a trap to vector 502 for the notification, as
            explained in the 88open Binary Compatibility Standard (BCS),
            revision 1.1A, chapter 9. (If several processes share a memory
            region, at least one of them should perform notification for the
            others, following any modifications and preceding execution by
            any of them.)

RETURN VALUE
       0 if successful, -1 otherwise.

DIAGNOSTICS
       If stkexec(2) fails, it sets errno to:

       EINVAL  The state value is invalid.

SEE ALSO
       csync(2), memctl(2), mmap(2) mprotect(2), stkprotect(2).


Licensed material--property of copyright holder(s)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026