I have been struggling to basically do the following:
1) Allocate a CEEPIPI pre-initialization table with one
empty entry.
2) Initialize the table with CEEPIPI init_sub_dp.
3) Add an entry to it with CEEPIPI add_entry (which LOADs
the module for me.) It also provides the entry-point for
the routine (there doesn't seem to be a nice way to retrieve
the entry point from LE, you have to either LOAD the module
yourself, or let LE do it with add_entry.)
4) Spin up several BPX pthreads (sub-tasks), under each BPX pthread
I invoked the LE subroutine with:
CEEPIPI call_sub_addr_nochk2
The BPX pthreads all seem to get 0C4s somewhere - it seems
that there is a wild-branch going on:
SYSTEM COMPLETION CODE=0C4 REASON CODE=00000011
TIME=18.44.13 SEQ=00338 CPU=0000
ASID=001D
PSW AT TIME OF ERROR 078D3400 000A0000 ILC 2 INTC
11
NO ACTIVE MODULE
FOUND
NAME=UNKNOWN
DATA AT PSW IS UNAVAILABLE AT THIS
TIME
AR/GR 0: 00000000/00000000_00000000 1:
00000002/00000000_1F9C5858
2: 00000000/00000000_000A0000 3:
00000000/00000000_1F9C5858
4: 00000000/00000000_1F983E98 5:
00000000/00000000_00000001
6: 00000000/00000000_1F98CAA8 7:
00000000/00000000_1F9C5900
8: 00000000/00000000_1F983DB8 9:
00000000/00000000_80000000
A: 00000000/00000000_0000DEF7 B:
00000000/00000000_8000CEF8
C: 00000000/00000000_1F98E3D0 D: 00000000/00000000_1F994030
E: 00000000/00000000_8000DF52 F:
00000000/00000050_000A0000
If I don't use call_sub_addr_nochk2, but instead just use call_sub_addr,
I get an 0C1 because of a bad address on a CS instruction somewhere in the
bowels of LE.
The bad interaction seems to be when my top-level TASK invokes the BPX
cond_wait()
function to wait on a cond_post() from the thread which ends.
The HLL program I'm running is a small C program that just returns a value
from the incoming parameter and does some printf()s to let us know it
got invoked.
It is compiled with these runopts:
#pragma runopts ( trap(on,nospie),interrupt(off),notest )
I typically see a few characters of output from the LE routine, which
tells me
it _did_ get invoked... but only a few...
I suppose I'm looking for examples of how to initialize a CEEPIPI
environment
in a primary task, load the HLL module in the primary task, then invoke
functions
in that environment in sub-tasks, wait for the sub-tasks to end, and then
terminate the initialized environment.
And - I'm making the assumption that a BPX cond_post will still operate
correctly in my sub-task (the sub-task is non-LE though.)
Lastly - the CEEPIPI function codes call_sub_addr_nochk and
call_sub_addr_nochk2
don't seem to be documented in the z/OS Language Environment Programming
Guide,
but _do_ appear in the z/OS Language Environment Vendor Interfaces. Can the
call_sub_addr_nochk and call_sub_addr_nochk2 sub-codes be used as the other
interfaces from the "Programming Guide" are used, or do they require
some other
environment...
From the doc in the "Vendor Interfaces" - it would seem that
call_sub_addr_nochk2
is the code I need to use in this situation... just can't seem to get it
working properly.
Maybe some BPX routine is messing it up...
Any pointers would be appreciated!
- *Many thanks* -
- Dave Rivers -
--
[email protected] Work: (919) 676-0847
Get your mainframe programming tools at http://www.dignus.com
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN