Display in C for multiple threads

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Oct 2009
Posts: 1
Reputation: chornox is an unknown quantity at this point 
Solved Threads: 0
chornox chornox is offline Offline
Newbie Poster

Display in C for multiple threads

 
0
  #1
Nov 3rd, 2009
Hello,

I need a pointer on how exactly I can use part of the terminal for inpit and another part for output.

Example

  1. Enter the next command> [my command] <other thread display some stuff>

Because I have a thread to display and a thread to read and I don't want to mix both outputs together.

Is there a way to do it in ANSI C/ posix ?

I just need a pointer to standard routines or library that I can use.

Thanks,
Last edited by chornox; Nov 3rd, 2009 at 1:22 am.
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 358
Reputation: dkalita will become famous soon enough dkalita will become famous soon enough 
Solved Threads: 56
dkalita's Avatar
dkalita dkalita is offline Offline
Posting Whiz
 
0
  #2
Nov 3rd, 2009
I dont think u can do that.
Its because the console is just a resource and the same resource cannot be shared by more than one process at a time.
When u are doing a read operation the console is reserved for that process and any write operation will only be executed when the read operation is complete and the resource is free.
Reply With Quote Quick reply to this message  
Reply

Message:




Views: 165 | Replies: 1
Thread Tools Search this Thread



Tag cloud for C
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC