- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ioctl with thread
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
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
Discussion Boards
Community
Resources
Forums
Blogs
- 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
12-04-2005 10:12 PM
12-04-2005 10:12 PM
ioctl with thread
"Invalid argument"
thrown by ioctl(2).
what maybe is the reason?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2005 12:53 AM
12-05-2005 12:53 AM
Re: ioctl with thread
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2005 01:00 PM
12-05-2005 01:00 PM
Re: ioctl with thread
But i can run the program without multi-thread environment. so i think there are problems in multi-thread using ioctl.
And now i can compiled it with -lpthread option. But ioctl still return -1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2005 01:45 PM
12-05-2005 01:45 PM
Re: ioctl with thread
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2005 03:07 PM
12-05-2005 03:07 PM
Re: ioctl with thread
Your meaning is there are some problems in my using the first argument of the ioctl?
i think there are maybe some problems with ioctl and pthread_mutex_lock?
the program like this:
for( ; ; ){
pthread_mutex_lock(&a);
while (event == NULL) {
pthread_cond_wai(&b,&a);
}
while (p != NULL) {
ã ã ã ioctl(fd, ...);
ã ã ã p = p->next;
ã ã }
pthread_cond_timedwait(&b,&a,&c);
pthread_mutex_unlock(&a);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2005 03:21 PM
12-05-2005 03:21 PM
Re: ioctl with thread
In your last posting, whatever is before ioctl(2,...) is garbled so I cannot comment on that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2005 05:27 PM
12-05-2005 05:27 PM
Re: ioctl with thread
for( ; ; ){
pthread_mutex_lock(&a);
while (event == NULL) {
pthread_cond_wai(&b,&a);
}
while (p != NULL) {
fd = socket(...);
ioctl(fd, ...);
close(fd);
p = p->next;
}
pthread_cond_timedwait(&b,&a,&c);
pthread_mutex_unlock(&a);
}
when i don't use the pthread_cond_timedwait(), there are no error.