bsd_usbloader_test.c (266887) | bsd_usbloader_test.c (266894) |
---|---|
1/* $FreeBSD: head/sys/boot/usb/bsd_usbloader_test.c 266887 2014-05-30 14:30:52Z hselasky $ */ | 1/* $FreeBSD: head/sys/boot/usb/bsd_usbloader_test.c 266894 2014-05-30 16:49:12Z hselasky $ */ |
2/*- 3 * Copyright (c) 2013 Hans Petter Selasky. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. --- 22 unchanged lines hidden (view full) --- 32extern int usleep(int); 33extern void callout_process(int); 34extern void usb_idle(void); 35extern void usb_init(void); 36extern void usb_uninit(void); 37 38#define hz 1000 39 | 2/*- 3 * Copyright (c) 2013 Hans Petter Selasky. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. --- 22 unchanged lines hidden (view full) --- 32extern int usleep(int); 33extern void callout_process(int); 34extern void usb_idle(void); 35extern void usb_init(void); 36extern void usb_uninit(void); 37 38#define hz 1000 39 |
40#ifdef HAVE_MALLOC |
|
40void * 41usb_malloc(size_t size) 42{ 43 return (malloc(size)); 44} 45 46void 47usb_free(void *ptr) 48{ 49 free(ptr); 50} | 41void * 42usb_malloc(size_t size) 43{ 44 return (malloc(size)); 45} 46 47void 48usb_free(void *ptr) 49{ 50 free(ptr); 51} |
52#endif |
|
51 52void 53DELAY(unsigned int delay) 54{ 55 usleep(delay); 56} 57 58int --- 35 unchanged lines hidden --- | 53 54void 55DELAY(unsigned int delay) 56{ 57 usleep(delay); 58} 59 60int --- 35 unchanged lines hidden --- |