LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-17-2004, 02:56 PM   #1
jwstric2
Member
 
Registered: Jan 2004
Posts: 105

Rep: Reputation: 15
effects interrupts may have on code (malloc, sleep, ect..)


Maybe someone has had a similar experience with this. I have an application reliable udp library I'm intergrating with some code. I have been getting strange errors that valgrind, gdb, and memcheck have all failed to find (by find I mean overwritten memory, bad allocations, null pointers, ect..) . Im wondering whether setting interrupt handlers on sockets has any effect on other code such as malloc and sleep. I was wondering this because the man page for sleep says to not use alarms and sleep together, which I am.

The errors are random and sometimes generate seg faults and other times bad results.
 
Old 07-17-2004, 03:59 PM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Try using nanosleep() for interrupt-save sleeps.
 
Old 07-17-2004, 05:27 PM   #3
jwstric2
Member
 
Registered: Jan 2004
Posts: 105

Original Poster
Rep: Reputation: 15
Thanks, I'll try this. Im just wondering how sleep and nanosleep differ in implementation , especially in dealing with interrupts.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching for Server (BOOTP/DHCP) <sleep> <sleep> .. .. Eileen Linux - Networking 12 10-21-2005 01:14 AM
User Preferences: Use HTML code instead of vB code? (vB code is overrated) stefanlasiewski LQ Suggestions & Feedback 5 07-26-2005 01:37 AM
kppp.allow - which ect folder does it go in? nelsonperry Fedora - Installation 1 09-05-2004 12:42 AM
Accessing the /ect Daredevil Linux - Newbie 1 03-05-2004 09:34 AM
Is something wrong with my /ect? eam Linux - Newbie 3 01-20-2004 04:39 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration