DCE for the HP e3000 HP e3000 MPE/iX Computer Systems Edition 3 Manufacturing Part Number: B3821-90003 E0801 U.S.A.
Notice The information contained in this document is subject to change without notice. Hewlett-Packard makes no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability or fitness for a particular purpose. Hewlett-Packard shall not be liable for errors contained herein or for direct, indirect, special, incidental or consequential damages in connection with the furnishing or use of this material.
Contents 1. General Information Version Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 DCE/3000 Components and Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Domestic and International Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2. Configuring DCE Cells Using the DCE Configuration Tool . . . . . . . . . . . . .
Contents 5. Programming with Kernel Threads Threads Synchronization and Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44 Mutexes (Mutual Exclusion Objects) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44 Condition Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44 Join Facility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Figures Figure 2-1. DCE Main Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 2-2. Security Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 2-3. Add CDS Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 2-4. Using LAN Profile Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 2-5.
Figures 6
Tables Table 1-1. CDS Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Table 1-2. DTS Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Table 1-3. Security Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Table 1-4. RPC Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Tables 8
Preface This manual describes the DCE for the HP e3000, based on OSF DCE version 1.0.2 source code. This manual is organized into the following chapters: Chapter 1 , “General Information,” provides information on version identification and components and limitations. Chapter 2 , “Configuring DCE Cells,” provides general information on using the DCE configurator tool and options.
1 General Information This version of DCE/3000 (version A.01.02) is based on OSF DCE version 1.0.2 source code. It provides the following OSF components for the core services: • Remote Procedure Calls (RPC) — supports the development of distributed applications by making requests to remotely networked machines as if they were local. RPCs also implement network protocols used by clients and servers to communicate with each other.
General Information Version Identification Version Identification Version information for the individual DCE/3000 components can be obtained by running the Version utility against the DCE program. You will find the product version (B3821AA A.01.02 for the domestic version, or B3822AA A.01.02 for the international version) and the program version control information at the beginning of the Version output. For example, the following is the output from the Version utility for an RPCD program: :version idl.
General Information DCE/3000 Components and Files DCE/3000 Components and Files The DCE/3000 components, their corresponding files, the files size (in sectors), and a description of the files are listed in the following tables, Table 1-1 shows the CDS components. Table 1-1 NOTE CDS Components Filename Description /usr/bin/cdsd shell script cdsd.hpdce.sys program /usr/bin/cdscp shell script cdscp.hpdce.sys program cdsadv.pub.sys command file /usr/bin/cdsadv shell script cdsadv.hpdce.
General Information DCE/3000 Components and Files The Security components are shown in Table 1-3. Table 1-3 Security Components Filename Description /usr/bin/sec_clientd shell script secclntd.hpdce.sys program seccrtdb.pub.sys command file /usr/bin/sec_create_db shell script seccrtdb.hpdce.sys program secadmin.pub.sys command file /usr/bin/sec_admin shell script secadmin.hpdce.sys program rgyedit.pub.sys command file /usr/bin/rgy_edit shell script rgyedit.hpdce.sys program acledit.
General Information DCE/3000 Components and Files Table 1-4 RPC Components Filename Sector Size Description rpcd.pub.sys 32 command file /usr/bin/rpcd 16 shell script rpcd.hpdce.sys 547 program rpccp.pub.sys 16 command file /usr/bin/rpccp 16 shell script rpccp.hpdce.sys 290 program idl.pub.sys 16 command file /usr/bin/idl 16 shell script idl.hpdce.sys 2,166 program uuidgen.pub.sys 16 command file /usr/bin/uuidgen 16 shell script uuidgen.hpdce.sys 125 program dced.
General Information DCE/3000 Components and Files The miscellaneous components are shown in Table 1-5. Table 1-5 Miscellaneous Components Filename Description /etc/dce_config/* shell scripts for dce_config tool /usr/lib/libdce.a NMRL DCEXL.HPDCE.SYS DCE shared library /usr/include/dce/*.h header files /usr/include/dce/*.idl idl files /opt/dce local/* directories for DCE use /usr/lib/libdce.sl POSIX shared library.
General Information Domestic and International Version Domestic and International Version The DCE/3000 Security component of /usr/lib/libdce.a uses the Data Encryption Standard (DES) algorithm as its default encryption algorithm. Because the United States DOD restricts the export of DES software, DCE/3000 supports two binary versions: The International version of the software disables the RPC data protection level privacy, disallowing users the ability to encrypt their data in RPCs.
General Information Domestic and International Version 18 Chapter 1
2 Configuring DCE Cells This section provides general information on using the DCE configurator to add your MPE/iX HP e3000 system into a cell. It is divided into two subsections: • Using the DCE Configuration Tool — provides detailed steps to bring up the DCE Configuration main menu (these steps must be completed each time you change the DCE cell configuration).
Configuring DCE Cells Using the DCE Configuration Tool Using the DCE Configuration Tool The DCE configurator (called dce_config) is a shell-script-based configuration tool, this enables you to run dce_config from within the MPE/iX POSIX shell. Check the following preliminary tasks before you enable the DCE configuration main menu: • Ensure that the system network is running (RPC requires network sockets). • Create an MPE/iX group named DCECONFG.
Configuring DCE Cells Using the DCE Configuration Tool Figure 2-1 DCE Main Menu DCE Main Menu 1. CONFIGURE CLIENT configure client and start DCE daemons 2. START re-start DCE daemons 3. STOP Stop DCE daemons stop DCE daemons and remove data files created by DCE daemons 4. REMOVE 99. EXIT selection: From this menu you can configure your system as a DCE client or client system. Configuring a DCE Client (Client-Only System) A DCE client can not be configured without a functional DCE cell.
Configuring DCE Cells Using the DCE Configuration Tool Figure 2-2 Security Client What is the name of the Security Server for this cell you wish to join? server1 . . . Enter the name of your cell (without /,,,/): n22cell Enter Cell Administrator’s principal name: cell_admin Enter password: password . . . This machine is now a security client. Two DCE daemon jobs (rpcd, dced) are streamed and are running. You are informed that your machine is now a Security client. 3.
Configuring DCE Cells Using the DCE Configuration Tool Figure 2-5 Configuring Question Should this machine be configured as a DTS Clerk, DTS Local Server, or DTS Global Server? (Default is DTS Clerk) (clerk, local, global, none) Once DTS daemon job (dtsd) is running, you are informed that this machine is now a DTS clerk. 6. Select 99 to exit from dce_config. WARNING The password for the “cell_admin none none” user is a well-known default value.
Configuring DCE Cells Using the DCE Configuration Tool 24 Chapter 2
3 Threads Architecture on MPE/iX Threads library were the part of DCE product. From this release of RPC 1.2.1 threads will be delivered and maintained by the Process Management Group of CSY. Threads library is separated from the DCE library. This ensures that the threads programmers need not link their applications with the DCE library for the threads functionality. The threads library on MPE/iX was supporting the POSIX 1003.4a Draft4.
Threads Architecture on MPE/iX Threads Architecture Threads Architecture This section describes the architecture of threads on MPE/iX. The following terminology is adopted throughout the remainder of this document. The term process refers to the MPE/iX operating system notion of process. The term task is defined as a multi-threaded application (depending on the implementation, a task can consist of a single process or multiple processes).
Threads Architecture on MPE/iX Threads Architecture These attributes are required in order to be POSIX compliant. POSIX also permits each implementation to add its own thread creation attributes. The following attribute was added for MPE/iX: Debug: NOTE Enter debug before starting the thread PH capability is required to create a thread. From a process management point of view, thread creation is just an abbreviated form of process creation. All threads are created as siblings.
Threads Architecture on MPE/iX Threads Architecture Breakpoints. There are three types of breakpoints available when debugging a threaded program: Breakpoint Type Description Task-Wide Breakpoints that are recognized by any thread within a task. Thread-Specific Breakpoints that are identical to pin-specific breakpoints, but are thread-private, and are specified using an enhanced syntax.
Threads Architecture on MPE/iX Threads Architecture B HPFOPEN::@ Sets a breakpoint at HPFOPEN for the current pin (tin) with the stop-all-threads option that is honored if the pin belongs to a threaded task. B HPFOPEN:.3:@ Sets a breakpoint at HPFOPEN for tin 3 of the current task, and the breakpoint has the stop-all-threads option. B HPFOPEN:.@:@ Sets a task-wide breakpoint at HPFOPEN for the current task, and the breakpoint has the stop-all-threads option.
Threads Architecture on MPE/iX Threads Architecture TERM_KEEPLOCK Allows a process to retain the terminal semaphore under all conditions until the process terminates or the variable is reset to FALSE. However, this variable has the potential to create a deadlock. For example, a deadlock occurs if the process owning the terminal semaphore waits for another process that in turn is waiting for the debug terminal semaphore.
Threads Architecture on MPE/iX Building DCE Programs Building DCE Programs Header Files In addition to the standard POSIX libraries and HP C/XL functions, you may have to include the DCE header files, which can be found in the /usr/include/dce directory. If your C applications use Try/Catch for exception handling, you should include the following statement in the C programs: #include There are no MPE/iX equivalent libraries for /usr/lib/libbb.a or /usr/lib/libc_r.a.
Threads Architecture on MPE/iX Building DCE Programs 32 Chapter 3
4 DCE 1.2.1 Features and Programming Notes This section describes the differences between DCE 1.0.2 and DCE 1.2.1.
DCE 1.2.1 Features and Programming Notes RPC Changes RPC Changes Private Client Sockets Previously a common pool of sockets was shared by concurrent RPC requests. Making this concurrency work requires a “helper” thread created to read from all of the open sockets, and passing received data onto the call thread for which it is intended. With “Private client sockets” there are a couple of sockets (2/3), which will only be used for individual requests (private to the request thread).
DCE 1.2.1 Features and Programming Notes IDL Compiler IDL Compiler Out-of-Line Marshalling Out-of-line marshalling (library based marshalling) causes constructed data types such as unions, pipes or large structures to be marshalled or unmarshalled by auxiliary routines, thus reducing the stub size. The out_of_line attribute directs the IDL compiler to place the marshalling and unmarshalling code in IDL auxiliary stub files, rather than in the direct flow of the stub code.
DCE 1.2.1 Features and Programming Notes Control Programs and Daemons Control Programs and Daemons The following control programs are delivered with DCE 1.2.1: • cdscp — CDS control program • rpccp — RPC control program • dtscp — DTS control program • rgy_edit — Registry Edit • acl_edit — ACL edit On OSF DCE 1.2.1 the above control programs are replaced by a single control program called DCECP. However, DCECP is not supported on DCE 1.2.1 on MPE/iX.
DCE 1.2.1 Features and Programming Notes Transition of ACL Managers Transition of ACL Managers OSD DCE 1.2.1 provides ACL management facilities within libdce. The sec_acl_mgr API is obsolete, and it is no longer necessary to write an ACL manager. Refer to the OSF DCE documentation to determine how to use the new dce_acl API to greatly reduce the amount of specialized ACL code that might have to be dealt with. Application builders may want to try building their existing applications against DCE 1.2.
DCE 1.2.1 Features and Programming Notes Removing DCE Credentials Removing DCE Credentials A user’s DCE credentials (stored in the directory /opt/dcelocal/var/security/creds) are not automatically removed by exiting a shell or logging out. Unless any background processes require DCE credentials, the credentials can be removed before logging out by running kdestroy utility. This will make the system more secure by decreasing the opportunity for someone to maliciously gain access to your network credentials.
DCE 1.2.1 Features and Programming Notes Serviceability Improvements Serviceability Improvements DCE 1.2.1 has an improved feature of Serviceability. This feature is helpful in debugging any problems under different sub components of DCE. The default location for this file is /opt/dcelocal/var/svc/routing. The DCE_SVC_ROUTING_FILE environment variable can be used to name an alternate location for the file.
DCE 1.2.1 Features and Programming Notes Serviceability Improvements For example, to enable tracing for different components at different levels. dts:*.9:FILE:/tmp/logs/%ld.dts rpc:*.3:FILE:/tmp/logs/%ld.rpc sec:*.4:FILE:/tmp/logs/%ld.sec dhd:*.7:FILE:/tmp/logs/%ld.dhd cds:*.9:FILE:/tmp/logs/%ld.
DCE 1.2.1 Features and Programming Notes Security Delegation Security Delegation Intermediary servers can operate on behalf of the initiating client while preserving identities and ACLs. Compiling Multithreaded Application There are some new preprocessing directives that has been introduced to compile with latest Pthread implementation. _POSIX_SOURCE: This needs to be used when compiling any DCE application. It is not necessary when compiling threads only application.
DCE 1.2.1 Features and Programming Notes Security Delegation objects: ${server_OFILES} ${client_OFILES} fresh: clean all clean: @-rm $(IDLGEN) $(server_OFILES) $(client_OFILES) $(PROGRAMS) server: ${server_OFILES} ar -rc server.obj ${server_OFILES} callci linkedit \" 'link from=/SYS/PUB/STARTO, /Speedware/sleeper/server.obj;\ to=/Speedware/sleeper/server;xl=${XL};posix;share'\" client: ${client_OFILES} ar -rc client.
5 Programming with Kernel Threads Programming with threads is useful for structuring programs, performance enhancement through concurrency and overlapping I/O, and making client/server interaction more efficient (it increases programming complexity). Some things that need to be addressed when programming with threads are: • Creation and management of threads. • Threads synchronization and communication. • Threads scheduling.
Programming with Kernel Threads Threads Synchronization and Communication Threads Synchronization and Communication All threads in a process execute within a single address space and share resources. When threads share resources in an unsynchronized way, incorrect output can result from race conditions or thread scheduling anomalies. The Kernal Threads provide the following facilities and routines to synchronize thread access to shared resources.
Programming with Kernel Threads Threads Scheduling Threads Scheduling HP e3000 Kernel Threads scheduling is handled through the dispatcher, therefore each thread is visible to and known by the kernel. Altering the scheduling of one or more threads in a task is accomplished with the same tools and methods used to alter the scheduling of any non-threaded task. NOTE The HP e3000 Kernel Threads is a POSIX 1003.1 Draft 10 implementation.
Programming with Kernel Threads Writing Threaded Applications Writing Threaded Applications Useful hints on writing multi-threaded DCE applications: • All DCE applications are multi-threaded — DCE runtime software is multi-threaded and all DCE applications are multi-threaded; even if the application code itself does not explicitly create threads.
Programming with Kernel Threads Writing Threaded Applications task. • Using setjmp and longjmp — Do not use calls to setjmp and longjmp, these routines save and restore the signal mask and could inadvertently cause a signal that another thread is waiting on to be masked. Instead, use _setjmp and _longjmp; these routines do not manipulate the signal mask. When executing _longjmp be aware of the following: — Ensure you are returning to a state saved within the context of the same thread.
Programming with Kernel Threads Writing Thread-Safe Code Writing Thread-Safe Code The standard C/XL library is not completely thread-safe on the HP e3000. Hewlett-Packard has provided a set of wrapper functions to intercept calls to the C library and make them thread-safe. The threads library takes care of this intercept library implementation.
6 Introduction to RPC This version of DCE/3000 is based on the OSF DCE version 1.2.1 source code. It provides the Remote Procedure Call component of the core services of OSF DCE. Remote Procedure Call: supports the development of distributed applications by making requests to remotely networked machines as if they were local. RPCs also implement network protocols used by clients and servers to communicate with each other.
Introduction to RPC IDL Compiler: Interface definition language compiler. IDL compiler to converts an interface definition, written in IDL, into output files. The output files include a header file, server stub file, client stub file, and auxiliary files.
Introduction to RPC Runtime Library Runtime Library Private Client Sockets Previously a common pool of sockets was shared by concurrent RPC requests. Making this concurrency work requires that there be a “helper” thread created to read from all of the open sockets, passing received data onto the call thread for which it is intended. Now with “Private client sockets” there are a couple of sockets (2/3) which will be used only for individual requests (private to the request thread).
Introduction to RPC DCE-IDL Compiler for RPC 1.2.1 DCE-IDL Compiler for RPC 1.2.1 Out-of-Line Marshalling Out-of-line marshalling (library-based marshalling) causes constructed data types such as unions, pipes or large structures to be marshalled or unmarshalled by auxiliary routines, thus reducing the stub size. The out_of_line attribute directs the IDL compiler to place the marshalling and unmarshalling code in IDL auxiliary stub files, rather than in the direct flow of the stub code.
Introduction to RPC DCE-IDL Compiler for RPC 1.2.1 corresponding dimension is determined at runtime. Not all s in a min_is clause can be null. Below are examples of the syntax. Assume values of variables are as follows: long a = -10; long b = -20; long c = -30; long d = 15; long e = 25. • min_is(a)] long g1[*..10]; /* g1[-10..10] */ • [min_is(a)] long g2[*..10][4]; /* g2[-10..10][0..3] */ • [min_is(a,b)] long g3[*..10][*..20]; /* g3[-10..10][-20..20] */ • [min_is(,b)] long g4[2][*..20]; /* g4[0..
Introduction to RPC DCE-IDL Compiler for RPC 1.2.
Programming with RPC 1.2.1 on MPE/iX 7 This chapter explains the RPC application programming with a small example. The example consists of server and client components. The client makes a RPC request to the server and asks the server to sleep for a specified amount of time. The server serves this request from the client by going to sleep for the time given by the client. /* client.c ************************************************************************************ * This is the sleeper client program.
Programming with RPC 1.2.
Programming with RPC 1.2.1 on MPE/iX netaddr = (unsigned_char_t *)argv[1]; sleep_time = atoi(argv[2]); } /* rpc_string_binding_compose() -- * * Create a string binding using the command line hostname parameter. A * string binding must be converted into a binding handle, required by * the DCE runtime, before it can be used. * * The first parameter is an optional object UUID. This application does * not use multiple object UUIDs, so none is supplied.
Programming with RPC 1.2.1 on MPE/iX * * Inquire about the error status returned by the previous DCE call. * * The first parameter to this call is a DCE error_status_t presumed * to have been returned by a preceeding DCE call. The second * parameter is a string long enough to hold the longest possible * DCE error string -- the data type dce_error_string_t is defined * to be a character array of this length.
Programming with RPC 1.2.1 on MPE/iX /* * At this point the application is not actually connected to any * server, but it has all the information needed to establish a * connection to the remote server. Connection establishment happens in * the client stub function called below. */ PRINT_FUNC(PRINT_HANDLE, "Bound to %s\n", string_binding); /* rpc_string_free() -- * * Free a string allocated by the RPC runtime.
Programming with RPC 1.2.1 on MPE/iX * since this client uses the explicit binding method. */ remote_sleep(bh, sleep_time); /* CATCH_ALL -- * * The CATCH_ALL macro denotes the end of a TRY block. If an exception * occurs in any of the calls within the TRY block, control will pass to * the CATCH_ALL block where the exception is dealt with.
Programming with RPC 1.2.1 on MPE/iX /* manager.c *************************************************************************** * This is the server-side RPC manager function; this is the function that * actually implements the remote procedure defined in the .idl file. The * server stub (called by the RPC runtime) calls this function when an RPC * request comes in for this interface. * * The manager function takes the arguments defined in the .
Programming with RPC 1.2.1 on MPE/iX void remote_sleep ( /* [in] */ handle_t h, /* Use explicit binding */ /* [in] */ ndr_long_int time /* Seconds to sleep */ ) { PRINT_FUNC(PRINT_HANDLE, "Enter remote_sleep(%d) manager\n", time); /* * This is a mind-numbingly simple manager ... */ (void) sleep (time); PRINT_FUNC(PRINT_HANDLE, "Return from remote_sleep(%d) manager\n", time); return; } /* server.
Programming with RPC 1.2.1 on MPE/iX #include /* DCE error facility */ #include "common.h" /* Common defs for this app */ #include "sleeper.h" /* Output from sleeper.
Programming with RPC 1.2.1 on MPE/iX fprintf(stderr, "Unable to initialize tracing interface!\n"); } } #endif /* /* TRACING */ rpc_server_use_protseq() -- * * Specify the protocol sequences that the RPC runtime should use when * creating endpoints. The first parameter is a string representation * of a protocol sequence to use. The second parameter is the maximum * number of concurrent remote procedure call requests that the server * will accept.
Programming with RPC 1.2.1 on MPE/iX * associate with the third parameter. * type UUIDs (an advanced feature). This application does not use The third parameter is the manager * entry point vector, the array of functions used as implementations * for incoming remote procedure calls. A value of NULL indicates that * the runtime should use the default manager EPV generated by the IDL * compiler. The fourth parameter is the DCE error status.
Programming with RPC 1.2.1 on MPE/iX } else PRINT_FUNC(PRINT_HANDLE, "Bindings:\n"); /* * Print out the bindings obtained from the RPC runtime. This info is * only for debugging purposes -- it shows what protocol sequence and * ports have been grabbed by the runtime for this server. */ for (i = 0; i < bvec->count; i++) { /* rpc_binding_to_string_binding() -- * * Convert a binding handle to a string binding for printing. * first parameter is a binding handle. * are bvec->count binding handles).
Programming with RPC 1.2.1 on MPE/iX * second parameter is the binding vector returned by the RPC runtime * describing the endpoints (IP ports) on which this server is listening * for RPC requests. The third parameter is a vector of object UUIDs * that the server offers; this server does not implement multiple * objects so it specifies NULL. The fourth parameter is an annotation * used for informational purposes only.
Programming with RPC 1.2.1 on MPE/iX */ rpc_server_listen(rpc_c_listen_max_calls_default, &st); /* error status for this call */ if (st != rpc_s_ok) { dce_error_inq_text(st, dce_err_string, (int *)&_ignore); PRINT_FUNC(PRINT_HANDLE, "Listen returned with error: %s\n", dce_err_string); } else PRINT_FUNC(PRINT_HANDLE, "Stopped listening...\n"); /************************************************************************ * IMPORTANT NOTE: We will probably never reach here.
Programming with RPC 1.2.1 on MPE/iX * allocated by the runtime, the application should remember to free it. * The first parameter is the binding vector to free; the second * parameter is the DCE error status, which is ignored. */ rpc_binding_vector_free(&bvec, &_ignore); /* rpc_server_unregister_if() -- * * Unregister this server from the RPC runtime. This is unnecessary * since this process is about to exit, but is here to demonstrate good * programming style.
Programming with RPC 1.2.1 on MPE/iX /* * If you want to use the building blocks tracing facility then define the TRACING * flag in your compile (put -DTRACING in the Makefile). For this to compile and * link, you will need the building blocks library installed on your system. */ #include extern tr_handle_t * tr_handle; /* Building blocks tracing */ /* used by client, server */ /* * These print functions use the trace/log facility instead of stdio.
Programming with RPC 1.2.1 on MPE/iX /* sleeper.idl **************************************************************************** * This .idl file declares an interface with a set of remotely-callable * procedures. This file is compiled by the idl compiler into a C interface * declaration (.h) and a C client stub (_cstub.c) and server stub * (_sstub.c) that interface with the RPC runtime. You must write a manager * for this procedure (see manager.
Programming with RPC 1.2.1 on MPE/iX Compiling Multithreaded Application Compiling Multithreaded Application There are some new preprocessing directives that has been introduced to compile with latest Pthread implementation. _POSIX_SOURCE: This needs to be used when compiling any DCE application. It is not necessary when compiling threads-only application. _MPE_THREADS: This is used when compiling any DCE or multithreaded application. This directive is used to set the thread specific errno.
Programming with RPC 1.2.1 on MPE/iX Compiling Multithreaded Application IDLGEN = sleeper.h sleeper_*stub.c IDL = /SYS/HPBIN/SH /usr/bin/idl #IDL = /SYS/PUB/IDL all: objects ${PROGRAMS} objects: ${server_OFILES} ${client_OFILES} fresh: clean all clean: @-rm $(IDLGEN) $(server_OFILES) $(client_OFILES) $(PROGRAMS) server: ${server_OFILES} ar -rc server.obj ${server_OFILES} callci linkedit \" 'link from=/SYS/PUB/STARTO, /Speedware/sleeper/server.
Programming with RPC 1.2.
Index A activate, 27 ACTIVATE command, 30 algorithm default, 17 asynchronous signals, 46 B B3821AA, 12 B3822AA, 12 Breakpoints, 27 stop-all-threads, 28 task-wide, 28 thread-specific, 28 C C/XL library, 48 CDS, 11, 13 CDS client, 22 CDS components, 13 Cell Directory Service (CDS), 11 CM stack, 26 Commands, 27, 29 commands ACTIVATE, 29, 30 break, 30 CONTINUE, 30 debug, 30 SHOWPROC, 28 SUSPEND, 29, 30 TIN, 29 compiler flags, 31 compiling, 31 components CDS, 13 DTS, 13 miscellaneous, 16 OSF, 11 RPC, 14 Securit
Index I inherit scheduling, 26 initial thread, 26 international version, 12 intrinsics activate, 27 suspend, 27 K Kernel Threads, 45 Kernel Treads, 11 L Limitations, 30 M miscellaneous components, 16 multi-theraded task, 26 multithreaded, 46 mutexes, 44 Mutual Exclusion Objects, 44 N NM stack, 26 O OSF components, 11 P PCB, 26 PCBX, 26 PIB, 26 PIBX, 26 pin number, 26 POSIX, 20 POSIX compliant, 27 priority, 26 process, 26 process port, 26 pthread_create, 28 S safe code, 48 scheduling policy, 26 scheduling