squeue_impl.h revision da14cebe459d3275048785f25bd869cb09b5307f
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_SQUEUE_IMPL_H
#define _SYS_SQUEUE_IMPL_H
#ifdef __cplusplus
extern "C" {
#endif
#define SQ_NAMELEN 31
/*
* SQUEUE_DEBUG: If defined as 1, special code is compiled in which records
* additional information aiding debugging is recorded in squeue.
*
* SQUEUE_PROFILE: If defined as 1, special code is compiled in which collects
* various squeue statistics and exports them as kstats.
*
* Ideally we would like both SQUEUE_DEBUG and SQUEUE_PROFILE to be always set,
* but it affects performance, so they are enabled on DEBUG kernels and disabled
* on non-DEBUG by default.
*/
#ifdef DEBUG
#define SQUEUE_DEBUG 1
#define SQUEUE_PROFILE 1
#else
#define SQUEUE_DEBUG 0
#define SQUEUE_PROFILE 0
#endif
#define SQUEUE_DEFAULT_PRIORITY MAXCLSYSPRI
typedef struct sqstat_s {
} sqstat_t;
typedef struct squeue_set_s {
} squeue_set_t;
int, uint8_t);
extern void squeue_worker_wakeup(squeue_t *);
extern int ip_squeue_flag;
struct squeue_s {
int sq_count; /* # of mblocks in squeue */
/* Keep the debug-only fields at the end of the structure */
#ifdef DEBUG
int sq_isintr; /* serviced by interrupt */
void (*sq_curproc)();
#endif
};
/*
* State flags.
* Note: The MDB IP module depends on the values of these flags.
*/
#define SQS_POLL_CLEANUP 0x00010000
#define SQS_POLL_CLEANUP_DONE 0x00020000
#define SQS_POLL_QUIESCE 0x00040000
#define SQS_POLL_QUIESCE_DONE 0x00080000
#define SQS_POLL_RESTART 0x00100000
#define SQS_POLL_THR_QUIESCED 0x00200000
#define SQS_POLL_THR_RESTART 0x00400000
#define SQS_POLL_RESTART_DONE 0x01000000
#define SQS_POLL_THR_QUIESCE 0x02000000
#define SQS_WORKER_THR_CONTROL \
#define SQS_POLL_THR_CONTROL \
#ifdef __cplusplus
}
#endif
#endif /* _SYS_SQUEUE_IMPL_H */