PThreads: Semi-FAQ Revivison 5
Search
Google
Web
cognitus.net

POSIX Threads: Semi-FAQ Revision 5.2

© 2001-2006 Michael M. Lampkin
email: michael.lampkin<at>ieee.org

1. Introduction

This "FAQ" is a work in progress which was begun in 2001 and continues to evolve. There are other "FAQ" documents by other authors and groups concerning multi-threaded programming and this is not meant to supercede them in any way. It is merely my own compendium of observations, questions and answers.

Since I am calling it an FAQ, it does contain answers to many of the questions most frequently asked as pertains to the use of POSIX Threads as defined by IEEE Std 1003.1-2001. It does mostly stick to POSIX Threads and not other 3rd party implementations so it would probably be unsuitable e.g. for an individual desiring more information on threaded programming in the Microsoft Windows environment.

This FAQ is part one of a multiple document bundle, where the additional files consists of various source code examples keyed by name to the FAQ section identifier to which they refer.

1.1 General Information

The FAQ is available in HTML format on the Internet via the following HTTP URIs:

http://www.cognitus.net

Further editions will be made available in other formats as requested and if possible.

The FAQ and related materials will be updated on a regular basis in an attempt to keep it up to date with the current POSIX Threads specification and submitted questions, answers and code examples.

1.2 How to Read This FAQ

While it is my hope that those new to POSIX Threads, from now on referred to as pthreads, programming will find this document useful, it is intended as much to be a reference to the PThreads specification as it is intended to be a tutorial. Considering this, the organization is primarily based upon the various available Pthread components and their functionality instead of being formatted by submission date or the complexity of the individual topics.

Some source code is included within the FAQ proper but in other cases the source code is incomplete and not intended for copying or compilation without the addition of reader supplied code. More complete code examples will be provided in a separate down loadable tar file in the near future.

1.3 Coding Standards Used

This FAQ uses a bit of an unusual coding standard as compared to normal C programming for the example code. A quick and incomplete overview of that standard is:

* function return values and names are on their own line

* opening and closing bracketing is place on their own line.

* function parameters are on their own line and indented 2 spaces.

* all conditional statements are code blocked.

* any conditional with conditions is organized over and under if the statement would exceed 80 characters.

* etc.

There is a rational behind this standard. Quite simply, this document is being formatted to fit into a standard 80 columns and by having a lot of over and under type blocking the actual lines of interest are typically NOT wrapped. The idea is that this will help with the readability of the example code.

1.4 Reader Contributions and Comments

Comments, corrections and additions are welcomed and should be emailed to michael.lampkin<at>ieee.org or posted to the forum for review. All such correspondence will be dealt with as quickly as I can manage and if appropriate, integrated into the FAQ with proper credits.

The following are a simple set of rules individuals should follow to expedite the processing of their contribution:

a) All email submissions should be in plain text format only. Any submission received in a format other than text will probably not be reviewed.

b) All submissions, if they are for direct inclusion into the FAQ, should be proof-read for spelling and grammatical errors by the author and corrections applied where necessary prior to submission. Apologies in advance for all the spelling and grammatical errors that currently exist in the document ;-)

c) All submissions, if they are for intended for direct inclusion into the FAQ, should be clearly labeled as to the section of the FAQ to which they relate.

d) Code submissions must be in the C programming language and should be clearly and completely documented. Please note that I will be creating and making accessible online a coding standards document to compliment section 1.3 of this document in the near future. I ask that anyone making code submissions follow those rules for the sake of uniformity.

1.5 Acknowledgments

As this FAQ continues to evolve, I hope and expect that over time a large number of people will submit comments, questions, answers and example code to be added to the body of the FAQ and its related components.

For the record though, it should be stated that as the maintainer I am responsible for the addition of such material to the FAQ and as such, accept all responsibility to the limits specified under section 1.6, for any inaccuracies, omissions or errors contained within this text.

1.6 Notice of Copyright and Permissions

The document "POSIX Threads: Semi-FAQ Revision 5" and associated support materials (hereafter referred to as the Articles) are Copyright 2001-2006 by Michael M. Lampkin (hereafter referred to as the Author).

These Articles are subject to the following conditions:

* Complying with all applicable copyright laws is the sole responsibility of the user. No part of the Articles may be reproduced in any form or by any means, be they mechanical, recording, or otherwise, or for any purpose other than personal or educational use without the express written permission of the Author.

* The Author may have intellectual property rights, including but not limited to patents, patent applications, copyrights and trademarks covering the subject matter contained within the Articles. The furnished Articles do not confer up the recipient(s) any license to such intellectual property except as expressly provided in any written or digitally signed license agreement from the Author.

* The Author makes no representation or warranty, expressed or implied, as to the correctness of information contained within or suitability of the Articles for any particular purpose. The Author shall not be held liable for any damages suffered, whether real or imagined, as a result of using information contained within the Articles, any derivatives or any referenced external items.


©2003-2006 Michael M. Lampkin

All rights reserved.

Use of this website signifies your agreement to the Terms of Use.