Date: Thu, 27 Apr 2006 00:16:55 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 96174 for review Message-ID: <200604270016.k3R0GtUB049056@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=96174 Change 96174 by jb@jb_freebsd2 on 2006/04/27 00:16:37 This is a hack for a function which should be in assembler. Check-and-set. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hacks.c#8 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hacks.c#8 (text+ko) ==== @@ -147,10 +147,14 @@ vprintf(fmt,args); } uint32_t -dtrace_cas32(uint32_t *a, uint32_t b, uint32_t c) +dtrace_cas32(uint32_t *target, uint32_t cmp, uint32_t new) { - printf("%s:\n",__FUNCTION__); - return 0; + uint32_t old; + + if ((old = *target) == cmp) + *target = new; + return (old); + } void *dtrace_casptr(void *a, void *b, void *c) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604270016.k3R0GtUB049056>