Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

getq(9f) [plan9 man page]

getq(9F)						   Kernel Functions for Drivers 						  getq(9F)

NAME
getq - get the next message from a queue SYNOPSIS
#include <sys/stream.h> mblk_t *getq(queue_t *q); INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). PARAMETERS
q Pointer to the queue from which the message is to be retrieved. DESCRIPTION
getq() is used by a service ( srv(9E)) routine to retrieve its enqueued messages. A module or driver may include a service routine to process enqueued messages. Once the STREAMS scheduler calls srv() it must process all enqueued messages, unless prevented by flow control. getq() obtains the next available message from the top of the queue pointed to by q. It should be called in a while loop that is exited only when there are no more messages or flow control prevents further processing. If an attempt was made to write to the queue while it was blocked by flow control, getq() back-enables (restarts) the service routine once it falls below the low water mark. RETURN VALUES
If there is a message to retrieve, getq() returns a pointer to it. If no message is queued, getq() returns a NULL pointer. CONTEXT
getq() can be called from user or interrupt context. EXAMPLES
See dupb(9F). SEE ALSO
srv(9E), bcanput(9F), canput(9F), dupb(9F), putbq(9F), putq(9F), qenable(9F) Writing Device Drivers STREAMS Programming Guide SunOS 5.10 12 Nov 1992 getq(9F)

Check Out this Related Man Page

getq(9F)						   Kernel Functions for Drivers 						  getq(9F)

NAME
getq - get the next message from a queue SYNOPSIS
#include <sys/stream.h> mblk_t *getq(queue_t *q); INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). PARAMETERS
q Pointer to the queue from which the message is to be retrieved. DESCRIPTION
getq() is used by a service ( srv(9E)) routine to retrieve its enqueued messages. A module or driver may include a service routine to process enqueued messages. Once the STREAMS scheduler calls srv() it must process all enqueued messages, unless prevented by flow control. getq() obtains the next available message from the top of the queue pointed to by q. It should be called in a while loop that is exited only when there are no more messages or flow control prevents further processing. If an attempt was made to write to the queue while it was blocked by flow control, getq() back-enables (restarts) the service routine once it falls below the low water mark. RETURN VALUES
If there is a message to retrieve, getq() returns a pointer to it. If no message is queued, getq() returns a NULL pointer. CONTEXT
getq() can be called from user or interrupt context. EXAMPLES
See dupb(9F). SEE ALSO
srv(9E), bcanput(9F), canput(9F), dupb(9F), putbq(9F), putq(9F), qenable(9F) Writing Device Drivers STREAMS Programming Guide SunOS 5.10 12 Nov 1992 getq(9F)
Man Page

11 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Ignoring newlines in my search

I have a file that has lines that are deliminated with '^A', but some of the lines go for a few lines and I need those lines to be appended into one line. All of the lines start with 'low debug' and end with ' " 0 '. How can I read each line from start to finish without some of the data... (7 Replies)
Discussion started by: ndedhia1
7 Replies

2. Shell Programming and Scripting

Help with sed

Hi All, Here is my problem. I have a file with lots of lines in them. I need to find a pattern that looks like "21/06/2010 21:50:06 " (with out double quotes) and replace it with enter.(Bring the rest of the text following it to newline) I was able to do it in VI but I need to do this via... (8 Replies)
Discussion started by: johnasvini
8 Replies

3. Programming

C++ program help

this won't compile can you please help thx... Header files: ******************************************** VideoItem class ************************************ #pragma once #include <string> using namespace std; class VideoItem { public: VideoItem(); //default constructor... (1 Reply)
Discussion started by: polineni
1 Replies

4. Shell Programming and Scripting

awk length count

Morning, every one. I have a file like this: AAEQGAGNQPQH 27 AAGETQY 51 AAGGSSYNEQF 12 AAGGYEQY 72 AAGLEAKNIQY 159 AAGPYEQY 26 AAGQDYNSPLH 45 AAGQGGEQF 1587 AAGREGGNTEAF 4 AAGSPQH 3 AAGSYEQY 45 AAGTGAYEQY 19 AAGTSGNNEQF 79 AAGWNTEAF 37 I want to count the string length of the... (2 Replies)
Discussion started by: xshang
2 Replies

5. Shell Programming and Scripting

Shell Command to compare two xml lines while ignoring xml tags

I've got two different files and want to compare them. File 1 : HTML Code: <response ticketId="944" type="getQueryResults"><status>COMPLETE</status><description>Query results fetched successfully</description><recordSet totalCount="1" type="sms_records"><record... (1 Reply)
Discussion started by: Shaishav Shah
1 Replies

6. Shell Programming and Scripting

Compare two xml files while ignoring some xml tags

I've got two different files and want to compare them. File 1 : <response ticketId="944" type="getQueryResults"><status>COMPLETE</status><description>Query results fetched successfully</description><recordSet totalCount="1" type="sms_records"><record id="38,557"><columns><column><name>orge... (2 Replies)
Discussion started by: Shaishav Shah
2 Replies

7. Shell Programming and Scripting

SQL Script HELP Requested.

Hello ALL , i am requesting help on for this script i am preparing to get the result of a query in a excel sheet : current Error: Script : NO Excel file created. requesting to know where i am going wrong. #!/bin/ksh... (2 Replies)
Discussion started by: anirudhkashikar
2 Replies

8. Shell Programming and Scripting

Reading Multi Line SQL in UNIX

Hello, Currently, I am reading few queries from the below .sql file --SOURCE TABLE NAME --SOURCE QUERY SEL COL1, COL2, COL3, COL4, COL5, COL6, COL7 WHERE COL5 = '2015-11-04 16:24:00.000000' FROM SOURCE TABLE; --TARGET TABLE NAME --TARGET QUERY SEL COLUMN1, COLUMN2, COLUMN3, COLUMN4,... (4 Replies)
Discussion started by: ronitreddy
4 Replies

9. Solaris

How can i enable audit logs for global zone and standard zones?

HI Community, how can i configure audit logs for global zones and standard zone. i have enabled and started auditd service and it went to maintenance mode. please help me to configure that Thanks & Regards, BEn (9 Replies)
Discussion started by: bentech4u
9 Replies

10. UNIX for Dummies Questions & Answers

How to delete blank line/s before and after a search pattern?

Hi, Test file x.txt below. This file is generated by a program that I unfortunately do not have control on how it gets presented/generated. create PACKAGE "XXX_INTERFACE_DEFECT_RPT_TEST" is TYPE refCursor IS REF CURSOR; Function queryRecords ( p_status varchar2, ... ... ... )... (4 Replies)
Discussion started by: newbie_01
4 Replies

11. Shell Programming and Scripting

[Bash] passing variables to executable doesn't work

Bash version 4.4.20 / Ubuntu 16.0.4 Hello, I tried to write a script that gathers some data and passes them to an executable. The executed application answers with an error. The echo output in the script returns correct values. If I copy/paste the last echo command, it get's executed... (2 Replies)
Discussion started by: sushi2k7
2 Replies