Date: Thu, 26 Jul 2001 13:59:13 -0700 From: Arun Sharma <arun@sharmas.dhs.org> To: hackers@freebsd.org Subject: Need a clean room implementation of this function Message-ID: <20010726135913.A23052@sharmas.dhs.org>
next in thread | raw e-mail | index | archive | help
I'm porting a BSD licensed Java VM from Linux to FreeBSD and ran into the following Linux function which is not implemented in BSDs. To avoid GPL contamination issues, can someone complete[1] the following method in inlined IA-32 assembly ? Intel instruction reference documents an instruction called BTS, which does just this. Thanks! -Arun [1] I've already looked at the Linux implementation - does that disqualify me ? Has anyone dealt with such issues in the past ? /** * test_and_set_bit - Set a bit and return its old value * @nr: Bit to set * @addr: Address to count from * * This operation is atomic and cannot be reordered. * It also implies a memory barrier. */ static __inline__ int test_and_set_bit(int nr, volatile void * addr); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010726135913.A23052>