GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: pthread_mutex
Operating System - HP-UX
1859568
Members
7034
Online
110403
Solutions
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
Forums
Categories
This widget could not be displayed.
Company
This widget could not be displayed.
Local Language
This widget could not be displayed.
back
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
back
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
Blogs
Information
This widget could not be displayed.
This widget could not be displayed.
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- This widget could not be displayed.This widget could not be displayed.This widget could not be displayed.This widget could not be displayed.This widget could not be displayed.This widget could not be displayed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2011 01:14 AM
03-02-2011 01:14 AM
pthread_mutex
Hi
we are having problem when our program start on HP-UX 11.23 itanium.
Our program is ported from 11.0 and it is 32bit program running under aries.
The program is using pthread_mutex library to be thread-safe under multithreading.
There are two threads Thread A and B.
The problem is... before finishing mutex initialization by pthread_init on Thread A, Thread B accesses the
exclusive area on thread A , and get Access Violation.
The program create thread A and B in order, but when it is executed on fast processor,
thread B's execution is too fast. I am guessing that is why this problem is occurred.
This problem is only happens on application using initialization of pthread_mutex.
When I encounter this problem, should I put "sleep" on thread B and wait for a second?
If anyone know if OS patch addressing above problem, let me know.
we are having problem when our program start on HP-UX 11.23 itanium.
Our program is ported from 11.0 and it is 32bit program running under aries.
The program is using pthread_mutex library to be thread-safe under multithreading.
There are two threads Thread A and B.
The problem is... before finishing mutex initialization by pthread_init on Thread A, Thread B accesses the
exclusive area on thread A , and get Access Violation.
The program create thread A and B in order, but when it is executed on fast processor,
thread B's execution is too fast. I am guessing that is why this problem is occurred.
This problem is only happens on application using initialization of pthread_mutex.
When I encounter this problem, should I put "sleep" on thread B and wait for a second?
If anyone know if OS patch addressing above problem, let me know.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2011 01:38 AM
03-02-2011 01:38 AM
Re: pthread_mutex
>before finishing mutex initialization by pthread_init
You should initialize mutexes before you start threads.
Or initialize them statically:
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
>If anyone know if OS patch addressing above problem
Patches don't usually address programming errors.
You should initialize mutexes before you start threads.
Or initialize them statically:
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
>If anyone know if OS patch addressing above problem
Patches don't usually address programming errors.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP