17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25
26
27 /*
28 * rseq implementation
29 */
30
31 #include <sys/usb/clients/usbser/usbser_rseq.h>
32
33 #ifdef _KERNEL
34 #include <sys/debug.h>
35 #include <sys/ddi.h>
36 #include <sys/sunddi.h>
37 /*LINTED E_STATIC_UNUSED*/
38 static long rseq_random();
39 #define random rseq_random
40 #else
41 #include <assert.h>
42 #define ASSERT assert
43 #include <stdlib.h>
44 #endif
45
46
47 /*ARGSUSED*/
48 static int
49 rseq_do_common(rseq_t *rseq, int num, uintptr_t arg, int flags, int fail_err,
50 uintptr_t fail_num)
51 {
52 int i;
53 rseq_step_t *s;
54 int rval = RSEQ_OK;
55
56 for (i = 0; i < num; i++) {
57 s = &rseq[i].r_do;
|
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25
26
27 /*
28 * rseq implementation
29 */
30
31 #include <sys/usb/clients/usbser/usbser_rseq.h>
32
33 #ifdef _KERNEL
34 #include <sys/debug.h>
35 #include <sys/ddi.h>
36 #include <sys/sunddi.h>
37 static long rseq_random();
38 #define random rseq_random
39 #else
40 #include <assert.h>
41 #define ASSERT assert
42 #include <stdlib.h>
43 #endif
44
45
46 /*ARGSUSED*/
47 static int
48 rseq_do_common(rseq_t *rseq, int num, uintptr_t arg, int flags, int fail_err,
49 uintptr_t fail_num)
50 {
51 int i;
52 rseq_step_t *s;
53 int rval = RSEQ_OK;
54
55 for (i = 0; i < num; i++) {
56 s = &rseq[i].r_do;
|