1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
20 /********************************************************************20**
22 Name: System Services -- STREAMS
26 Desc: Data structure definitions for STREAMS messages.
30 *********************************************************************21*/
41 /* message block is defined in ssi.x */
42 typedef struct ssmsgb SsMblk;
49 uint8_t db_ref; /* reference count */
50 uint8_t db_type; /* type of data block */
52 Bool shared; /* is this data block shared ? */
53 #ifndef SS_DBUF_REFLOCK_DISABLE
54 SLockId dBufLock; /* Lock per Dbuf */
56 uint8_t *db_base; /* base of data buffer */
57 uint8_t *db_lim; /* limit of data buffer */
58 /* ss008.301 - deprecating for normal OS, useful for Cavium/RMI OS*/
59 #ifdef SS_DBLK_FREE_RTN
60 struct ssfree_rtn *db_frtnp; /* free routine */
61 #endif /* SS_DBLK_FREE_RTN */
64 typedef struct ssdatab SsDblk;
68 /* to free memory used with esballoc() */
71 void (*free_func)(char *); /* free function */
72 char *free_arg; /* argument to function */
75 typedef struct ssfree_rtn SsFrtn;
79 /* STREAMS functions prototypes */
80 S16 ssStrmCfg ARGS((Region, Region));
81 S32 ssAdjMsg ARGS((SsMblk *, S32));
82 SsMblk *ssAllocB ARGS((S32, uint32_t));
83 SsMblk *ssCopyB ARGS((SsMblk *));
84 SsMblk *ssCopyMsg ARGS((SsMblk *));
85 SsMblk *ssDupB ARGS((SsMblk *));
86 SsMblk *ssDupMsg ARGS((SsMblk *));
87 SsMblk *ssESBAlloc ARGS((uint8_t *, S32, S32, SsFrtn *));
88 void ssFreeB ARGS((SsMblk *));
89 void ssFreeMsg ARGS((SsMblk *));
90 void ssLinkB ARGS((SsMblk *, SsMblk *));
91 S32 ssMsgDSize ARGS((SsMblk *));
92 S32 ssPullupMsg ARGS((SsMblk *, S32));
93 SsMblk *ssRmvB ARGS((SsMblk *, SsMblk *));
94 S32 ssTestB ARGS((S32, uint32_t));
95 SsMblk *ssUnlinkB ARGS((SsMblk *));
102 #endif /* __SSSTRMX__ */
104 /**********************************************************************
106 **********************************************************************/