DCE for the HP 3000 HP 3000 MPE/iX Computer Systems Edition 2 Manufacturing Part Number: B3821-90002 E1095 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. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DCE/3000 Components and Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Domestic and International Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuration and Diagnostic Tools . . . . . .
Contents Header Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Compiler Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Unresolved Externals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MPE/iX Makefile Example . . . . . . . . . . . . . . .
Figures Figure 3-1. DCE Main Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 3-2. DCE Configuration Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 3-3. Initial Cell Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 3-4. Reconfiguring Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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 3000, it is 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, “Installing DCE/3000 Software,” provides hardware and software requirements, media and preinstallation planning. Chapter 3, “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) — support 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 RPCD.
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 Sector Size Description cdsd.pub.sys 32 command file /usr/bin/cdsd 16 shell script cdsd.hpdce.sys 4,309 program cdscp.pub.sys 16 command file /usr/bin/cdscp 16 shell script cdscp.hpdce.
General Information DCE/3000 Components and Files Table 1-2 DTS Components Filename Sector Size Description dtsntpp.pub.sys 32 command file /usr/bin/dts_ntp_provider 16 shell script dtsntpp.hpdce.sys 242 program The Security components are shown in Table 1-3. Table 1-3 Security Components Filename Sector Size Description secd.pub.sys 32 command file /usr/bin/seed 16 shell script secd.hpdce.sys 15,815 program secclntd.pub.
General Information DCE/3000 Components and Files Table 1-3 Security Components Filename Sector Size Description kinit.hpdce.sys 1,396 program klist.pub.sys 16 command file /usr/bin/klist 16 shell script klist.hpdce.sys 331 program destroy.pub.sys 16 command file /usr/bin/kdestroy 16 shell script kdestroy.hpdce.sys 279 program The RPC components are shown in Table 1-4. Table 1-4 Chapter 1 RPC Components Filename Sector Size Description rpcd.pub.
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/*.
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.
General Information Configuration and Diagnostic Tools Configuration and Diagnostic Tools The dce_config configuration tool, provided by OSF, is available in the MPE/iX environment. Some MPE/iX commands, such as SHOWPROC and ALTPROC, are enhanced to display information for the threaded tasks under DCE. Glance/XL also displays information about individual threads in a task, however the threads are currently identified by their pin number, not their thread ID within the task.
General Information Release Limitations Release Limitations Some of the limitations described here reflect limitations of OSF DCE 1.0.2, other limitations are specific to this release only. Limitations of OSF DCE 1.0.2 • There is no support for application localization (only English is supported), or for application internationalization. NOTE Localization is defined as making software interfaces appear in the native language of the country in which the software is run.
General Information Release Limitations Interoperability of the Domestic and International Versions The Domestic and International versions are interoperable with one limitation, Domestic-based application servers or clients that specify the privacy RPC data protection level are not interoperable with servers or clients based on the International version. Neither the Domestic or International versions of DCE are interoperable with any DCE version that have been built with the DES code omitted.
General Information DCE/3000 versus DCE/9000: Differences DCE/3000 versus DCE/9000: Differences It is assumed that readers have the basic understanding of the differences between MPE/iX POSIX environment and a UNIX based system environment. This section is intended to give end users some key concepts on their first exposure to DCE/3000. File Naming Convention The traditional MPE directory structure is made up for a three-level hierarchy and names for those accounts, groups, and files are all upshifted.
General Information Release Documents Release Documents The following lists the documents associated (shipped) with this release of DCE/3000: • Introduction to OSF DCE (ISBN 0-13-490624-1) (HP P/N B3190-90005) • DCE Application Environment Specification — RPC (ISBN 0-13-043688-7) (HP P/N B3190-90011) • OSF DCE User’s Guide and Reference (ISBN 0-13-643842-3) (HP P/N B3190-90017) • Understanding DCE (ISBN 1-56592-005-8) (HP P/N B3190-90018) • Guide to Writing DCE Applications (ISBN 1-56592-045-7) (HP P/N B31
2 Installing DCE/3000 Software This section defines the hardware/software requirements, media, preinstallation planning, account structure changes, and the basic installation procedure required for this release of DCE/3000. Hardware and Software Requirements Any system that you want to make a member of a DCE cell must meet certain hardware and software requirements. The system requirements are: System Type Any HP 3000 (Series 900) system.
Installing DCE/3000 Software Distribution Media Distribution Media DCE/3000 is not included on the MPE/iX release/update tapes. The DCE/3000 software is shipped on either of two types of media: • 8mm DAT tape • 6250 bpi mag tape DCE/3000 product installation should be completed only after all other HP 3000 products have been installed or updated.
Installing DCE/3000 Software Preinstallation Planning Preinstallation Planning Preinstallation planning involves deciding on how many cells to configure, which systems to include in each cell, and where to run the DCE services (for example, Security, CDS, and DTS). This section provides some decision making guidelines for preinstallation planning. Determining Cell Boundaries Before installation, map the boundaries of your cell by listing the systems that will compose your cell.
Installing DCE/3000 Software Accounting Structure Change Accounting Structure Change Most files from the DCE/3000 product tape should be restored to the SUPPORT account, depending on the version: • B3821AA for the domestic version (installation job I00B3821A). • B3822AA for the international version (installation job I00B3822A). When the installation is complete, the DCE files are moved and new groups and directories are created.
Installing DCE/3000 Software Checking the System State Checking the System State When installing DCE/3000, your system is not required to be in the single user state. However, once you have installed the DCE/3000 software and are reinstalling or updating it, all DCE users must be logged off, and all DCE servers and clients must be stopped. If any DCE file is being accessed during a reinstallation or update, those DCE files may not be reinstalled or updated in a consistent state.
Installing DCE/3000 Software Installation Installation To install DCE/3000, perform the following steps: 1. Log off all users and log on at the console as MANAGER.SYS. 2. Create the following groups if they do not exist. At the system prompt, enter: NEWGROUP HPDCE.SYS NEWGROUP THREADS.SYS NEWGROUP B3821A.SUPPORT for product B3821AA or NEWGROUP B3822A.SUPPORT for product B3822AA 3. Restore the files from your DCE product tape. NOTE Do not use the local option in the RESTORE command.
3 Configuring DCE Cells This section provides general information on using the DCE configurator to add your MPE/iX HP 3000 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 Options Using the DCE Configuration Options The DCE configure options allow you to perform multiple tasks on a given DCE cell. This subsection includes the required steps (in order): 1. Configuring an Initial Cell 2. Configuring a DTS Server 3. Configuring a DCE Client (Client-Only System) 4. Removing or Reconfiguring a Client 5.
Configuring DCE Cells Using the DCE Configuration Options 2. Select “1. Initial Cell Configuration” from the DCE Configuration Menu, the Initial Cell Configuration menu as shown in Figure 3-3 is displayed: Figure 3-3 Initial Cell Configuration Initial Cell Configuration 1. Security Server 2. Initial CDS Server 98. Return to previous menu 99. EXIT selection: 3. Select “1. Security Server” from the Initial Cell Configuration menu.
Configuring DCE Cells Using the DCE Configuration Options Security configuration takes approximately five to ten minutes. When complete, three DCE daemon jobs (rpcd, secd and secclntd) are running. After the Security server has completed configuration, dce_config returns to the DCE Configuration menu. 5. From the DCE Configuration Menu, select “1. Initial Cell Configuration”. Then select “2. Initial CDS Server” to configure the CDS server.
Configuring DCE Cells Using the DCE Configuration Options To configure a DTS server, perform the following steps: 1. Select “2. Additional Server Configuration” from the DCE Configuration Menu. The Additional Server Configuration menu as shown in Figure 3-8 is displayed. Figure 3-8 Additional Server Configuration Additional Server Configuration 1. Additional CDS Server(s) 2. DTS 3. Replica Security Server 98. Return to previous menu 99. EXIT selection: 2. Select “2. DTS” to configure the DTS server.
Configuring DCE Cells Using the DCE Configuration Options NOTE DTS requires at least three servers in order to function. Skipping DTS will not have a direct impact on Security and CDS. However, Security requires that clock skew among systems be no more than five minutes. If the difference is more than 5 minutes, you can use the MPE/iX SETCLOCK command to reset your system clocks on the DTS server systems. Ensure that the system time and TIMEZONE are both set correctly with SETCLOCK. 4.
Configuring DCE Cells Using the DCE Configuration Options 6. To display the current time from the dtscp program, setup the following softlink in the shell: shell/iX> id /etc/zoneinfo shell/iX> in -s US/Pacific localtime California local time When the localtime softlink has been set, then the time can be displayed with the following command: shell/iX> dtscp show current time 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 Options Figure 3-13 Add CDS Client . . . Continue or exit from dce_config. Do you wish to continue? Y . . . Enter name of primary CDS server: server1 Can my+machine broadcast to server1? Answer “Yes” if my_machine (the name of your machine) is on the same LAN as the remainder of the cell. If you are not sure if they are on the same LAN, respond “No.
Configuring DCE Cells Using the DCE Configuration Options • stopping a cell • changing the name of a cell • changing or modifying a configuration To remove or reconfigure a client (the client cannot be a Security server or a CDS server), perform the following steps: 1. Bring up the DCE main menu (as described in “Using the DCE Configuration Tool” earlier in this section). 2. Select the “4. UNCONFIGURE” option (this option can be executed from any system in the cell).
Configuring DCE Cells Using the DCE Configuration Options Removing or Reconfiguring a Server The procedure described below is used for: • removing a DCE server • reconfiguring a DCE server • changing the name of a cell • changing or modifying a configuration • restoring a server after a system crash NOTE If you want to unconfigure the server, do not perform an “UNCONFIGURE”, instead perform a “REMOVE” option. Removing a Security or CDS server requires that you reconfigure the entire cell.
Configuring DCE Cells Using the DCE Configuration Options 40 Chapter 3
4 Programming Notes This section assumes that DCE application developers have some experienced in porting standard C applications to the MPE/iX POSIX environment. For application developers who are not familiar with the MPE/iX POSIX and C language interface, please read the MPE/iX Developer’s Kit (36430A) first.
Programming Notes 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).
Programming Notes Threads Architecture All threads are created as siblings. The threads of a task all have the same father task; namely, the father of the initial thread. If a thread creates a child using creatprocess, that child is the child of the task, not of the thread. From the tasks child-point-of-view, its father is the initial thread. When a thread exits, the children and the threads it created are not terminated. Threads do not “own” the child processes they create.
Programming Notes Threads Architecture [init_thread_pin].tin specification specifies a stop-all-threads breakpoint option. For example: Example Breakpoint Description B thd_mtx:2e.2 Sets a breakpoint at thd_mtx to be recognized by tin 2 of the task with initial thread 2e. B thd_mtx:.2 Sets a breakpoint at thd_mtx to be recognized by tin 2 of the current task. B start_thread:2c.@ Sets a task-wide breakpoint at start_thread to be recognized by all threads within the task with initial thread 2c.
Programming Notes Threads Architecture that is waiting to enter debug, from obtaining the terminal semaphore and interfering with the debug session. 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.
Programming Notes 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.
Programming Notes Building DCE Programs MPE/iX Makefile Example The following is an MPE/iX makefile example. # # (c) Copyright 1992, 1993 Hewlett-Packard Co. # # @(#)HP DCE/3000 1.0.2 # @(#)Module: Makefile $Revision:1.1.7.2 $ # $Date:1993/07/08 00:06:21$ # Makefile modified for use on an HP 3000. # DEBUG = INCENV = -I.
Programming Notes Building DCE Programs $(CC) ${LDFLAGS} ${client_OFILES} ${LIBS} -o $@ mv -f sleeper_client /SYS/PUB/SLEEPCLT callci linkedit \"altprog sleepclt.pub.sys\;xl='othdxl.threads.sys'\" mv -f /SYS/PUB/SLEEPCLT sleeper_client sleeper_cstub.c sleeper_sstub.c sleeper.h: ${IDLFILES} $(IDL) ${IDLFLAGS} ${IDLFILES} sleeper_cstub.o sleeper_sstub.o manager.o server.o client.o: sleeper.h manager.o server.o client.o: common.
Programming Notes Building DCE Programs HP-UX Makefile Example The following is an HP-UX makefile example. # # (c) Copyright 1992, 1993 Hewlett-Packard Co. # # @(#)HP DCE/9000 1.0.2 # @(#)Module: Makefile $Revision: 1.1.7.2 $ # $Date: 1993/07/08 00:06:21$ # Makefile for use with an HP 9000. # DEBUG = -g INCENV = -I.
Programming Notes Building DCE Programs 50 Chapter 4
5 Programming with Kernel Threads Programming with threads, is useful for structuring programs, enhancing performance through concurrency and overlapping I/O, making client/server interaction more efficient, and increases programming complexity. Some things you need to address 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 DCE Threads Service provides the following facilities and routines to synchronize thread access to shared resources.
Programming with Kernel Threads Threads Scheduling Threads Scheduling HP 3000 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 Chapter 5 The HP 3000 Kernel Threads Service is a kernel based implementation of POSIX 1003.4a Draft 4 threads.
Programming with Kernel Threads Writing Threaded Applications Writing Threaded Applications The following are hints on writing multithreaded DCE applications: • All DCE applications are multithreaded — When writing DCE applications, keep in mind, that the DCE runtime software is multithreaded and all DCE applications are multithreaded; even if the application code itself does not explicitly create threads.
Programming with Kernel Threads Writing Threaded Applications 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. — If you _longjmp over a TRY clause, an exception could try to _longjmp to a stack frame that no longer exists; and vice versa. — Do not _longjmp out of a signal handler.
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 3000. Hewlett-Packard has provided a set of wrapper functions to intercept calls to the C library and make them thread safe. The wrapper definitions reside in the /usr/include/thdwrp.h file.
Programming with Kernel Threads Reentrant Interfaces Reentrant Interfaces Many /lib/libc.a (POSIX C Library) routines return pointers to internal static data. This causes problems in a multithreaded program; while one thread tries to access the data another thread could be modifying it in some way. The following are interfaces that should be called by multithreaded programs. These versions of the interfaces are different from the original versions. The reentrant definitions currently defined in /lib/libc.
Programming with Kernel Threads stdio Interfaces stdio Interfaces Some of the stdio interfaces (such as getchar() and putchar()) are available as functions within C/XL and as macros defined in stdio.h. The macro versions exist for performance reasons. Calls to the library implementation of these interfaces is intercepted by the thread wrapper functions, making them thread-safe; but the macros have not been made thread-safe.
Programming with Kernel Threads Debugging Threaded Applications Debugging Threaded Applications The following are hints for debugging threaded applications: • Set breakpoints for global data bugs — To simplify debugging problems involving unexpected changes in global data, use HPDEBUG to set task-wide data breakpoints. Otherwise, make sure there is a breakpoint that every thread will hit.
Programming with Kernel Threads Process Management Commands Process Management Commands Process management (threads related) features of commands are listed here. For detailed information about the commands, refer to the MPE/iX Commands Reference Manual (32650-90006). SHOPROC • Using the ;PIN= parameter, pin.thread_id can be specified to denote a specific thread of the task. • Using the ;FORMAT=SUMMARY option displays one line for each thread of the task.
Programming with Kernel Threads Process Management Commands • From the STATE(5) or STATE(7) display, the execution state of the process is indicated. STATE can be one of the following: WAIT: Generic process block, usually waiting for a message. BLKCB: Blocked for control block. BLKMM: Blocked for memory manager. READY: Ready to execute or executing. Using the SUMMARY format, the STATE field is blank on the summary line of a threaded task. ALTPROC • Using the ;PIN= parameter, pin.
Programming with Kernel Threads Process Management Intrinsics Process Management Intrinsics Process management (threads related) features of intrinsics are listed here. For detailed information about the intrinsics, refer to the MPE/iX Intrinsics Reference Manual (32650-90013). PROCINFO The PROCINFO intrinsic returns threads related information to the caller.
Programming with Kernel Threads Process Management Intrinsics SUSPEND and ACTIVATE If a thread invokes SUSPEND (or ACTIVATE) only that thread is suspended. Other restrictions for suspending a thread are: • Child waits — A thread is only be permitted to wait for the children it created. An attempt to wait on a child created by another thread results in an error. • Father waits — Only the initial thread can issue a father wait. An error is returned to secondary threads issuing a father wait.
Programming with Kernel Threads Changes to AIF Routines Changes to AIF Routines The following AIF routine item numbers are associated with kernel threads: AIFPROCGET and AIFPROCPUT The following are the associated item numbers: Item# Name (Type) and Description 2137 Thread Type (I32) — Indicates what type of thread this process is. Valid values are: 0 Regular process (not a thread).
Programming with Kernel Threads Changes to AIF Routines AIFSYSWIDEGET Chapter 5 Following is the associated item number: Item# Name (Type) and Description 2137 Thread Type (I32A) — Passing this criteria returns the PIDs of processes with the thread type equal to the specified criteria value. Valid values for this item are: 0 Regular process (not a thread). 1 Initial thread (process created by the RUN command or CREATEPROCESS that has executed at least one PTHREAD intrinsic).
Programming with Kernel Threads Input Reference Parameter Protection for Intrinsics Input Reference Parameter Protection for Intrinsics When an intrinsic accepts a reference parameter, the data within that parameter could be changed by another thread if the data does not lie on the calling thread's stack. If it appeared that a corrupt input reference parameter could either cause the system to abort or corrupt system data structures, protection was added to that intrinsic.
Programming with Kernel Threads Input Reference Parameter Protection for Intrinsics MKS Routines Some routines from MKS available for POSIX are: confstr fnmatch getopt glob popen regerror regexec sysconf system wordexp It is up to the caller to provide the necessary protection scheme for input reference parameters used by the MKS routines.
Programming with Kernel Threads File Access From Threads File Access From Threads The following is a high-level overview of the file system functionality available: • The file system supports thread sharable NM disk files, including user mapped files and spoolfiles. CM files (tapes, cir, rio, CM KSAM) are thread private (Thread-Non-Sharable). Thread-Semi-Sharable terminals and printers are supported.
Programming with Kernel Threads GlanceXL GlanceXL GlanceXL displays a task’s thread information and child information separately. The thread information is not formatted like that found in SHOWPROC. Each thread looks like an individual process, having it’s pin number (used by the dispatcher) displayed, as opposed to it’s thread number within the task.
Programming with Kernel Threads XL.PUB.SYS XL.PUB.SYS In a threaded environment, any XL module that used global or static variables has the potential to have these data areas corrupted. The following table lists the modules that appear to be safe to use in a threaded environment. However, until all modules are explicitly thread-safe, it is recommended that you provide your own locking scheme to prevent multiple calls to all entry points. Table 5-1 Thread-Safe XL.PUB.
Programming with Kernel Threads PTHREAD Intrinsics PTHREAD Intrinsics The following are the PTHREAD intrinsics supported for DCE/3000. The PTHREAD procedure and type declarations are located in the PTHREADH.THREADS file.
Programming with Kernel Threads PTHREAD Intrinsics pthread_mutex_trylock (mutex) /* returns 0 if owned */ pthread_mutex_t *mutex /* by current thread */ /* (ver 5) versus */ /* -1 (ver 3) */ int pthread_mutex_unlock (mutex) pthread_mutex_t *mutex; int pthread_cancel (thread) pthread_thread_t thread; int pthread_setasynccancel (state) /* May only set async */ int state; /* cancel off!! */ /* Async Cancels not */ /* supported.
Programming with Kernel Threads PTHREAD Intrinsics pthread_self () void pthread_yield () int pthread_attr_create (attr) pthread_attr_t *attr; int pthread_attr_delete (attr) pthread_attr_t *attr; int pthread_attr_setstacksize (attr, stacksize) pthread_attr_t *attr; long stacksize; int pthread_create (thread, attr, start_routine, arg) pthread_thread_t *thread; pthread_attr_t attr; /* attr IGNORED! */ pthread_ void *(*start_routine) (); void *arg; int pthread_join (thread, exit_status) pthread_thread_t thre
Programming with Kernel Threads PTHREAD Intrinsics The following macros are defined in pthread.
Index Symbols $STDIN, 68 $STDLIST, 68 A account structure, 23 accounting, 26 ACD, 26 ACLs, 33 ACTIVATE, 63 activate, 43 ACTIVATE command, 45 AIF, 64 AIF Intrinsics, 66 AIFPROCGET, 64 AIFPROCPUT, 64 AIFSYSWIDEGET, 65 algorithm default, 17 ALTPROC command, 18 asynchronous signals, 54 authentication, 20 B B3821AA, 12, 26, 28 B3822AA, 12, 26, 28 BLKCB, 61 BLKMM, 61 Breakpoints, 43 stop-all-threads, 43 task-wide, 43 thread-specific, 43 breakpoints, 59 C C queue, 21 C/XL library, 56 CD, 26 CD (Create Directory En
Index csadv, 37 rpcd, 33, 36 secclntd, 33, 36 secd, 33 DCE Daemons, 21 cdsd, 21 rpcd, 21 secd, 21 DCE daemons stopping, 39 DCE file locations, 26 DCE installation, 28 DCE main menu, 30 DCE program name comparisons, 21 DCE Security, 11, 20 DCE servers CDS, 36 DTS, 36 Security, 36 DCE/3000, 11 dce_config, 18, 30, 32, 38, 39 dce_login, 32 DCECONFG, 30 DCEXL, 11 DD, 26 DD (Delete Directory Entries), 26 debug, 42 debug thread commands, 45 debugging treaded applications, 59 Delete Directory Entries (DD), 26 DES (
Index L Limitations, 45 limitations, 19 OSF DCE 1.0.2, 19 localization, 19 localtime, 36 M makefile, 47 MANAGER.SYS, 28 manager.
Index secclntd, 33 secd, 33 security, 21 Security client, 36 Security components, 14 SENDMAIL, 63 SETCLOCK, 35 SETCLOCK commnd, 35 SHOWPROC, 44, 69 SHOWPROC command, 18 SHOWPROC display, 60 signal handlers, 54 single mask, 54 softlink, 36 software requirements, 23 spoolfile, 28 SR 5 space, 42 SS_TERM_KEEPLOCK, 59 stack size, 42 STANDARD CONFORMANCE, 46 start_thread, 44 STATE, 60, 61 stdio interfaces, 58 stop DCE daemon, 39 stopping a cell, 38 SUMMARY format, 60 SUSPEND, 63 suspend, 43 SUSPEND command, 45 sy