osdep.h revision d39a76e7b087a3d0927cbe6898dc0a6770fa6c68
/*
* 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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* This file is part of the Chelsio T1 Ethernet driver.
*
* Copyright (C) 2003-2005 Chelsio Communications. All rights reserved.
*/
#ifndef _CHELSIO_OSDEP_H
#define _CHELSIO_OSDEP_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Solaris includes
*/
#define BIG_ENDIAN 4321
#define LITTLE_ENDIAN 1234
#if defined(__sparc)
#define BYTE_ORDER BIG_ENDIAN
#else
#define BYTE_ORDER LITTLE_ENDIAN
#endif
#include <sys/ethernet.h>
#include "ostypes.h"
#include "oschtoe.h"
#include "ch_compat.h"
#include "ch.h"
#define FILE_IDENT(a) static char *id = a
#define ETH_ALEN 6
#define __tpi_read tpi_read
#define __tpi_write tpi_write
struct t1_rx_mode {
};
#define __devinit
/* kludge for now */
#define SPIN_LOCK(x) mutex_enter(&(x))
#define SPIN_UNLOCK(x) mutex_exit(&(x))
#define SPIN_TRYLOCK(x) mutex_tryenter(&(x))
#define SPIN_LOCK_DESTROY(x) mutex_destroy(&(x))
typedef struct ch_cyclic_s {
void (*func)(void *);
void *arg;
} ch_cyclic_t, *p_ch_cyclic_t;
void ch_init_cyclic(void *, p_ch_cyclic_t, void (*)(void *), void *);
void ch_start_cyclic(p_ch_cyclic_t, unsigned long);
void ch_stop_cyclic(p_ch_cyclic_t);
void ch_cyclic(p_ch_cyclic_t);
#ifdef __cplusplus
}
#endif
#endif /* _CHELSIO_OSDEP_H */