The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
help About fifo and thread bblackened High Level Programming 0 05-16-2009 07:51 AM
Doubts on FIFO Akshay UNIX for Dummies Questions & Answers 0 06-06-2008 07:56 AM
Threads and Threads Count ? varungupta UNIX for Advanced & Expert Users 2 03-21-2008 09:23 PM
how to use fifo atticus High Level Programming 3 06-05-2006 10:15 AM
FIFO over NFS saabir UNIX for Advanced & Expert Users 2 08-06-2003 08:03 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-02-2009
Sandia_man Sandia_man is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 17
How to see a FIFO from all the threads?

Hello C programming fellows!!!

I'm doing a program with multiple threads in gnu/linux, ubuntu for beeing precise...

This program consist in multiple threads, as logical each thread do different things and communicate to each other using IPC.

The problem is that in "process 1" I have a FIFO, an ordinary one (using malloc), and I need the same FIFO to be poped a pushed from all the threads... I've been trying different things but nothing work...

Is this possible??? Where can I read something about this???

The other possibility is to make a FIFO for each thread and keep them updated using some invented protocol between threads, but I would prefer not doing this because I'm wasting lots of memory.

Someone have (is correct or I have to use has??) any idea???


Thanks in advance!!!

bye!
  #2 (permalink)  
Old 10-02-2009
fpmurphy's Avatar
fpmurphy fpmurphy is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2003
Location: Florida
Posts: 1,913
Yes it can be done. What you have to do is create a thread safe FIFO (queue). One place to look for implementation ideas is the Apache portable runtime utility apr_queue_* APIs.
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:11 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0