Solved

Threads in HP-UX

Posted on 1998-06-18
2
599 Views
Last Modified: 2013-12-06
Is there any threading mechanism in HP-UX? Does HP-UX support POSIX threads? Please give details regarding this.
0
Comment
Question by:sudheer122697
2 Comments
 
LVL 84

Expert Comment

by:ozo
Comment Utility
pthread_create(3T)

NAME

pthread_create() - create a new thread of execution.

SYNOPSIS

#include <pthread.h>

int pthread_create(
   pthread_t *thread,
   const pthread_attr_t *attr,
   void *(*start_routine)(void *),
   void *arg
);

0
 

Accepted Solution

by:
jsm earned 20 total points
Comment Utility
Sometime ago (2-3 years) HP-UX added support for userland DCE threads, but I don't know what release that support was added, and that type of threading is of minimal use in my opinion.

Real kernel threads were implemented in the 10.30 release of HP-UX. 10.30 is a Series 800 only release (servers), i.e. it is not supported in general on Series 700 machines (workstations). There will never be kernel thread support for Series 700 machines in a 10.X based release (The most recent supported release for Series 700 machines is 10.20).

Kernel threads for Series 700 machines is not currently available, but it will be available hopefully in another month or two as a patch release based on 11.0 HP-UX (11.0 is currently only supported on Series 800 machines).  This patch release will add support for most Series 700 machines (Some real old Series 700 machines were obsoleted, i.e. 705,710,720,730,750,755, and will never be supported on an 11.x based release).

The user API for HP-UX kernel threads is defined by the POSIX thread standard. You need to add a -lpthread to your compile line to access the pthread library.

Note that even when you have a version of HP-UX that supports kernel threads you still may have problems depending on what you are doing, since not all libraries are thread safe at this point. All C library and system calls are thread safe. You should consult the man pages for other API's to determine what level of thread safing is supported according to the Posix standard.


0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now