07-12-2012
That's what I've done. My question is where to put the function print_help();
I do have a few functions and they are quite long. They involve
sending information to the user. I have now put them in another
file.
10 More Discussions You Might Find Interesting
1. Programming
thank you of your help
my application system is :
windows 2000 pc --- HP unix minicom ---- windows NT
I am programming with C language on HP unix minicom , I want to get files with ftp command from windows 2000 pc to HP unix minicom in my program, and also put files with ftp command... (1 Reply)
Discussion started by: bdyjm
1 Replies
2. UNIX for Advanced & Expert Users
I'm looking for some 'well documented' .profile examples (8 Replies)
Discussion started by: JimC
8 Replies
3. Shell Programming and Scripting
Can someone give me an example of two shells? (1 Reply)
Discussion started by: wmosley2
1 Replies
4. HP-UX
how can I find cpu usage memory usage swap usage and
I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times
my final destination is monitor process
logical volume usage above X % and number of Logical voluage above
can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies
5. UNIX for Advanced & Expert Users
Hi all,
I'm running a simulator and I'm noticing an slow increase in memory for long simulations such that the simulation has to end because of a lack of memory. A colleague of mine ran Valgrind memcheck and reported that nothing of interest was reported other than known mem leaks. My advisor... (2 Replies)
Discussion started by: pl4u
2 Replies
6. AIX
How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies
7. Shell Programming and Scripting
Hi, I need a word doc or pdf which contains lots of Shell Programming samples... This is for my open book examination, thanks in advance.. (2 Replies)
Discussion started by: karthikeayan
2 Replies
8. Shell Programming and Scripting
Hi
I have a program
int main(int srgc, char *argv)
{
for(int i=1; i<50; i++)
{
system("dd if=/dev/zero of=file$i bs=1024 count=$i");
}
return 0;
}
My doubt is how to use the "$i" value inside C code
Please help (2 Replies)
Discussion started by: Priya Amaresh
2 Replies
9. Shell Programming and Scripting
Hello,
I am working on an application that uses allot of memory depending on the input. I am also working on more than one processing algorithm.
The program has a long processing time (hours) so it would be nice to be able to monitor the maximum memory footprint of the application during runs... (1 Reply)
Discussion started by: LMHmedchem
1 Replies
10. Ubuntu
Hi, i am facing a strange issue with wine. I am using ubuntu 14, 17 and 18 and in all version same thing, app which works perfeclty suddenly slow down, and i see that use too much CPU. First, i was thinking that memory is the problem, but now i am thinking that cpu is main problem.
I have a... (10 Replies)
Discussion started by: tomislav91
10 Replies
put(9E) Driver Entry Points put(9E)
NAME
put - receive messages from the preceding queue
SYNOPSIS
#include <sys/types.h>
#include <sys/stream.h>
#include <sys/stropts.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>
int prefixrput(queue_t *q, mblk_t *mp);
/* read side */
int prefixwput(queue_t *q, mblk_t *mp);
/* write side */
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). This entry point is required for STREAMS.
ARGUMENTS
q Pointer to the queue(9S) structure.
mp Pointer to the message block.
DESCRIPTION
The primary task of the put() routine is to coordinate the passing of messages from one queue to the next in a stream. The put() routine is
called by the preceding stream component (stream module, driver, or stream head). put() routines are designated ``write'' or ``read''
depending on the direction of message flow.
With few exceptions, a streams module or driver must have a put() routine. One exception is the read side of a driver, which does not need
a put() routine because there is no component downstream to call it. The put() routine is always called before the component's correspond-
ing srv(9E) (service) routine, and so put() should be used for the immediate processing of messages.
A put() routine must do at least one of the following when it receives a message:
o pass the message to the next component on the stream by calling the putnext(9F) function;
o process the message, if immediate processing is required (for example, to handle high priority messages); or
o enqueue the message (with the putq(9F) function) for deferred processing by the service srv(9E) routine.
Typically, a put() routine will switch on message type, which is contained in the db_type member of the datab structure pointed to by mp.
The action taken by the put() routine depends on the message type. For example, a put() routine might process high priority messages,
enqueue normal messages, and handle an unrecognized M_IOCTL message by changing its type to M_IOCNAK (negative acknowledgement) and sending
it back to the stream head using the qreply(9F) function.
The putq(9F) function can be used as a module's put() routine when no special processing is required and all messages are to be enqueued
for the srv(9E) routine.
RETURN VALUES
Ignored.
CONTEXT
put() routines do not have user context.
SEE ALSO
srv(9E), putctl(9F), putctl1(9F), putnext(9F), putnextctl(9F), putnextctl1(9F), putq(9F), qreply(9F), queue(9S), streamtab(9S)
Writing Device Drivers
STREAMS Programming Guide
SunOS 5.10 12 Nov 1992 put(9E)