mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-12 14:29:28 +00:00
Inlined insque and remque.
This commit is contained in:
parent
ce921c90fd
commit
ee06dc6013
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=1837
@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: cpufunc.h,v 1.13 1994/08/02 07:38:43 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -107,11 +107,36 @@ tlbflush()
|
||||
static inline u_long
|
||||
rcr2()
|
||||
{
|
||||
u_long data;
|
||||
u_long data;
|
||||
__asm __volatile("movl %%cr2,%%eax" : "=a" (data));
|
||||
return data;
|
||||
}
|
||||
|
||||
struct quehead {
|
||||
struct quehead *qh_link;
|
||||
struct quehead *qh_rlink;
|
||||
};
|
||||
|
||||
static inline void
|
||||
insque(void *a, void *b)
|
||||
{
|
||||
register struct quehead *element = a, *head = b;
|
||||
element->qh_link = head->qh_link;
|
||||
head->qh_link = (struct quehead *)element;
|
||||
element->qh_rlink = (struct quehead *)head;
|
||||
((struct quehead *)(element->qh_link))->qh_rlink
|
||||
= (struct quehead *)element;
|
||||
}
|
||||
|
||||
static inline void
|
||||
remque(void *a)
|
||||
{
|
||||
register struct quehead *element = a;
|
||||
((struct quehead *)(element->qh_link))->qh_rlink = element->qh_rlink;
|
||||
((struct quehead *)(element->qh_rlink))->qh_link = element->qh_link;
|
||||
element->qh_rlink = 0;
|
||||
}
|
||||
|
||||
#else /* not __GNUC__ */
|
||||
extern void insque __P((void *, void *));
|
||||
extern void remque __P((void *));
|
||||
|
@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: cpufunc.h,v 1.13 1994/08/02 07:38:43 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -107,11 +107,36 @@ tlbflush()
|
||||
static inline u_long
|
||||
rcr2()
|
||||
{
|
||||
u_long data;
|
||||
u_long data;
|
||||
__asm __volatile("movl %%cr2,%%eax" : "=a" (data));
|
||||
return data;
|
||||
}
|
||||
|
||||
struct quehead {
|
||||
struct quehead *qh_link;
|
||||
struct quehead *qh_rlink;
|
||||
};
|
||||
|
||||
static inline void
|
||||
insque(void *a, void *b)
|
||||
{
|
||||
register struct quehead *element = a, *head = b;
|
||||
element->qh_link = head->qh_link;
|
||||
head->qh_link = (struct quehead *)element;
|
||||
element->qh_rlink = (struct quehead *)head;
|
||||
((struct quehead *)(element->qh_link))->qh_rlink
|
||||
= (struct quehead *)element;
|
||||
}
|
||||
|
||||
static inline void
|
||||
remque(void *a)
|
||||
{
|
||||
register struct quehead *element = a;
|
||||
((struct quehead *)(element->qh_link))->qh_rlink = element->qh_rlink;
|
||||
((struct quehead *)(element->qh_rlink))->qh_link = element->qh_link;
|
||||
element->qh_rlink = 0;
|
||||
}
|
||||
|
||||
#else /* not __GNUC__ */
|
||||
extern void insque __P((void *, void *));
|
||||
extern void remque __P((void *));
|
||||
|
Loading…
Reference in New Issue
Block a user