Multithreaded Programming Guide
  Искать только в названиях книг
Загрузить это руководство в формате PDF

Preface

The Multithreaded Programming Guide describes the multithreaded programming interfaces for the Solaris(TM) 2.4 system. This guide shows application programmers how to create new multithreaded programs and how to add multithreading to existing programs.
To understand this guide, a reader must be familiar with
  • (R) · A UNIX SVR4 system--preferably the Solaris 2.4 system
  • The C programming language--multithreading is implemented through the libthread library

How This Guide Is Organized

Chapter 1, "Covering Multithreading Basics," gives a structural overview of the Solaris threads implementation.
Chapter 2, "Programming With Threads," discusses the general threads library routines.
Chapter 3, "Programming With Synchronization Objects," covers the threads library synchronization routines.
Chapter 4, "Programming With the Operating System," discusses changes to the operating system to support multithreading.
Chapter 5, "Safe and Unsafe Interfaces," covers multithreading safety issues.
Chapter 6, "Compiling And Debugging," covers the basics of compiling and debugging.
Chapter 7, "Programming Guidelines," discusses issues that affect programmers writing multithreaded applications.
Appendix A, "Sample Application Code," provides code examples you can refer to for clarification and practice.
Appendix B, "MT Safety Levels: Library Interfaces," is a table listing routines that are safe to use in multithreaded programs.

What Typographic Changes and Symbols Mean

Table P-1 describes the type changes and symbols used in this guide.
Table P-1
Typeface or SymbolMeaningExample
AaBbCc123Commands, files, directories, and C functions; code examplesThe fork1() function is new. Use ls -a to list all files.
AaBbCc123Variables, titles, and emphasized wordsThe stack_size value is set by... You must specify a zero value.
AaBbCc123What you type, contrasted with on-screen computer outputsystem% cc prog.c
page(#)The man page name and section in the Solaris Reference ManualSee thr_create(3T).
Sections of program code in the main text are enclosed in boxes:

  nt test (100);  
  
  main()  
  {  
       register int a, b, c, d, e, f;  
  
       test(a) = b & test(c & 0x1) & test(d & 0x1);