dupb man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



dupb(D3)							      dupb(D3)

NAME
     dupb - duplicate a message block

SYNOPSIS
     #include <sys/stream.h>
     #include <sys/ddi.h>
     mblk_t *dupb(mblk_t *bp);

   Arguments
     bp	       Pointer to the message block to be duplicated.

DESCRIPTION
     dupb creates a new message block structure that references the same data
     block that is referenced by bp.  Unlike copyb(D3), dupb does not copy the
     information in the data block, but creates a new structure to point to
     it.

   Return Values
     On success, dupb returns a pointer to the new message block.  On failure,
     it returns a NULL pointer.

USAGE
     The following figure shows how the db_ref field of the data block
     structure has been changed from 1 to 2, reflecting the increase in the
     number of references to the data block.  The new message block contains
     the same information as the first.	 Note that b_rptr and b_wptr are
     copied from bp, and that db_ref is incremented.
	   ______

		   |

	    |
	    ___

				   .
				   .
				    .
				    .
				     .
				     .
				      .
				      .
				       .
				       .
					.
					.
				   .
				   .
				    .
				    .
				     .
				     .
				      .
				      .
				       .
				       .
					.
					.
				   |
				   ______
					|
				  ______
	      .
	       .
	       .
		.
		.
		 .
		 .
		  .
		  .
		   .
		   .
		    .
	      .
	       .
	       .
		.
		.
		 .
		 .
		  .
		  .
		   .
		   .
		    .
	      |
	      ______
		    |
	      ______

				      |

		    nbp=dupb(bp);
		       |
		       __________________________
     __________________
	  Before
				    After
				 db_base
				db_ref (2)
				 |
				 _________
					  |
				 _________
	     |
	     _________
		      |
	     _________
	     db_base
	    db_ref (1)
			    bp

					 |
					 ______
						|
					  ______
					 b_datap

					 b_rptr
					 b_wptr
			    |
			    ______
				  |
			    ______
			    b_datap

			   b_rptr
			   b_wptr
     |
     ______
	   |
     ______
     b_datap

     b_rptr
     b_wptr
			  _________

			  |
					      nbp

			   ________

			   |

					_________

						 |

					________

						|

     bp

   Level
     Base or Interrupt.

									Page 1

dupb(D3)							      dupb(D3)

   Synchronization Constraints
     Does not sleep.

     Driver-defined basic locks, read/write locks, and sleep locks may be held
     across calls to this function.

REFERENCES
     copyb(D3), dupmsg(D3), datab(D4), msgb(D4)

									Page 2

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net