Sponsored Content
Full Discussion: Stream Read And Write Queues
Top Forums UNIX for Advanced & Expert Users Stream Read And Write Queues Post 21871 by Perderabo on Thursday 23rd of May 2002 07:07:49 PM
Old 05-23-2002
I wanted to refer to my Streams Docs before I answered this. I found the answer in UNIX SYSTEM V RELEASE 4 Programmer's Guide: Streams. On page 3-4 on my book it has the diagram you show together with some qinit stuff.

I suspect that your book may be similiar to mine. My chapter 4 is STREAMS Processing Routines. On page 4-4, the Asynchonous Protocol Stream Example starts. A few pages in I have:
Quote:
CHARPROC causes the echo to be transmitted back to the terminal by first copying the message with a STREAMS utility routine. Then CHARPROC uses another utility routine to obtain the address of its own write queue. Finally, the CHARPROC read put procedure uses another utility routine to call its write put procedure and pass it the message copy.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

read and write from a file

I have tried to show the file name whose size is greater than 200 byte in current directory. Please help me. ls -l | tr -s " " " " | cut -f 5,9 -d " " >out.txt #set -a x `cat out.txt` i=0 `cat out.txt` | while do read x echo $x #re=200 j=0 if }" < "200" ] then echo $j j=`expr $j... (2 Replies)
Discussion started by: rinku
2 Replies

2. Shell Programming and Scripting

Find all files with group read OR group write OR user write permission

I need to find all the files that have group Read or Write permission or files that have user write permission. This is what I have so far: find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}' It shows me all files where group read = true, group write = true... (5 Replies)
Discussion started by: shunter63
5 Replies

3. Programming

read/write files

Hi all, I have a problem with some read/write functions. I have a .bin file which contains a lot of structures as follows: struct alumno { char id; char apellido1; char apellido2; char nombre; float nota1p; float nota2p; float notamedia; char photofilename; }; What I have... (3 Replies)
Discussion started by: Attenea
3 Replies

4. Programming

read() blocks process until the stream is closed

Hi @all, i really stuck in programming a tool with bidirectional process communication (popen(cmd, "rw") ... something like that ;-)). Here is the code: if(pipe(p_stdin) != 0 || pipe(p_stdout) != 0) { fprintf(stderr, "Aufruf von pipe() schlug fehl.\n"); exit(1); } ... (6 Replies)
Discussion started by: jens.g
6 Replies

5. IP Networking

read/write,write/write lock with smbclient fails

Hi, We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies

6. Shell Programming and Scripting

[Video stream] network stream recording with mplayer

Hi I used this command: mplayer http://host/axis-cgi/mjpg/video.cgi -user root -passwd root \ -cache 1024 -fps 25.0 -nosound -vc ffh264 \ -demuxer 3 -dumpstream -dumpfile output.avi It's ok but... Video Playing is very fast! Why? Is it a synch problem? What parameter I have to use for... (1 Reply)
Discussion started by: takeo.kikuta
1 Replies

7. IP Networking

write() / read() syntax

hi am newbie to unix and socket programing I am trying to figuring out syntax for read and write to send data from server to client and client can read it I have to send two integers write(newsockfd,buffer,"%d %d",x,y,0) writing from client where x and y are two integers.. ... (7 Replies)
Discussion started by: karthik1238
7 Replies

8. Programming

Need help about read() and write() on TCP/IP

HI I need to implement a client/server TCP application. the customer is the client and the bartender is the server. When the customer enter the Bar, client connects to the server Server should reply the client immediately. Other wise if the server is busy, it should send an update message... (10 Replies)
Discussion started by: lixiao1212
10 Replies

9. UNIX for Dummies Questions & Answers

Read data from given filename or stream

I have a script that takes 2 parameters (say) as mandatory script1.sh a b The 3rd parameter can be filename which it should process or it can come through a pipeline stream The script should work both ways: script1.sh a b filec or cat filec | script1.sh a b How to put logic in the... (1 Reply)
Discussion started by: ysrini
1 Replies

10. Shell Programming and Scripting

File Read and Write

I have got a file in following format: AAAAAAA BBBBBBBB CCCCCCC DDDDDDD I am trying to read this file and out put it in following format: AAAAAAA,BBBBBBB,CCCCCCC,DDDDDD Preferred method is shell or Perl. Any help appreciated. (11 Replies)
Discussion started by: Araoki
11 Replies
put(9F) 						   Kernel Functions for Drivers 						   put(9F)

NAME
put - call a STREAMS put procedure SYNOPSIS
#include <sys/stream.h> #include <sys/ddi.h> void put(queue_t *q, mblk_t *mp); INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). PARAMETERS
q Pointer to a STREAMS queue. mp Pointer to message block being passed into queue. DESCRIPTION
put() calls the put procedure ( put(9E) entry point) for the STREAMS queue specified by q, passing it the message block referred to by mp. It is typically used by a driver or module to call its own put procedure. CONTEXT
put() can be called from a STREAMS module or driver put or service routine, or from an associated interrupt handler, timeout, bufcall, or esballoc call-back. In the latter cases, the calling code must guarantee the validity of the q argument. Since put() may cause re-entry of the module (as it is intended to do), mutexes or other locks should not be held across calls to it, due to the risk of single-party deadlock (put(9E), putnext(9F), putctl(9F), qreply(9F)). This function is provided as a DDI/DKI conforming replacement for a direct call to a put procedure. SEE ALSO
put(9E), freezestr(9F), putctl(9F), putctl1(9F), putnext(9F), putnextctl(9F), putnextctl1(9F), qprocson(9F), qreply(9F) Writing Device Drivers STREAMS Programming Guide NOTES
The caller cannot have the stream frozen when calling this function. See freezestr(9F). DDI/DKI conforming modules and drivers are no longer permitted to call put procedures directly, but must call through the appropriate STREAMS utility function, for example, put(9E), putnext(9F), putctl(9F), and qreply(9F). This function is provided as a DDI/DKI conforming replacement for a direct call to a put procedure. The put() and putnext() functions should be called only after qprocson() is finished. SunOS 5.10 28 Apr 1992 put(9F)
All times are GMT -4. The time now is 06:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy