PR port-ia64/51261

Add mb_read mb_write mb_memory
This commit is contained in:
scole 2016-08-05 16:59:26 +00:00
parent 7ae46ccb2d
commit 01e980a512
1 changed files with 23 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: lock.h,v 1.4 2009/07/20 04:41:37 kiyohara Exp $ */
/* $NetBSD: lock.h,v 1.5 2016/08/05 16:59:26 scole Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -116,4 +116,26 @@ __cpu_simple_unlock(__cpu_simple_lock_t *lockp)
*lockp = __SIMPLELOCK_UNLOCKED;
}
/* XXX mf.a overkill for these? */
static __inline void
mb_read(void)
{
__asm __volatile("mf.a \n"
"mf \n" ::: "memory");
}
static __inline void
mb_write(void)
{
__asm __volatile("mf.a \n"
"mf \n" ::: "memory");
}
static __inline void
mb_memory(void)
{
__asm __volatile("mf.a \n"
"mf \n" ::: "memory");
}
#endif /* _IA64_LOCK_H_ */