- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- pthread_mutex
Operating System - HP-UX
1821539
Members
2244
Online
109633
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
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
- 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
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP