| 2717 | } |
| 2718 | |
| 2719 | void |
| 2720 | clear_pcb_flags(struct pcb *pcb, const u_int flags) |
| 2721 | { |
| 2722 | |
| 2723 | __asm __volatile("andl %1,%0" |
| 2724 | : "=m" (pcb->pcb_flags) : "ir" (~flags), "m" (pcb->pcb_flags) |
| 2725 | : "cc", "memory"); |
| 2726 | } |
| 2727 | |
| 2728 | #ifdef KDB |
| 2729 | |
| 2730 | /* |
| 2731 | * Provide inb() and outb() as functions. They are normally only available as |
| 2732 | * inline functions, thus cannot be called from the debugger. |
| 2733 | */ |
| 2734 | |
| 2735 | /* silence compiler warnings */ |
| 2736 | u_char inb_(u_short); |
| 2737 | void outb_(u_short, u_char); |
| 2738 | |
| 2739 | u_char |
| 2740 | inb_(u_short port) |
| 2741 | { |
| 2742 | return inb(port); |
| 2743 | } |
| 2744 | |
| 2745 | void |
| 2746 | outb_(u_short port, u_char data) |
| 2747 | { |
| 2748 | outb(port, data); |
| 2749 | } |
| 2750 | |
| 2751 | #endif /* KDB */ |
| 2752 | |
| 2753 | #undef memset |
| 2754 | #undef memmove |
| 2755 | #undef memcpy |
| 2756 | |
| 2757 | void *memset_std(void *buf, int c, size_t len); |
| 2758 | void *memset_erms(void *buf, int c, size_t len); |
| 2759 | void *memmove_std(void * _Nonnull dst, const void * _Nonnull src, |
| 2760 | size_t len); |
| 2761 | void *memmove_erms(void * _Nonnull dst, const void * _Nonnull src, |
| 2762 | size_t len); |
| 2763 | void *memcpy_std(void * _Nonnull dst, const void * _Nonnull src, |
| 2764 | size_t len); |
| 2765 | void *memcpy_erms(void * _Nonnull dst, const void * _Nonnull src, |
| 2766 | size_t len); |
| 2767 | |
| 2768 | #ifdef KCSAN |
| 2769 | /* |
| 2770 | * These fail to build as ifuncs when used with KCSAN. |
| 2771 | */ |
| 2772 | void * |
| 2773 | memset(void *buf, int c, size_t len) |
| 2774 | { |
| 2775 | |
| 2776 | return (memset_std(buf, c, len)); |
no outgoing calls
no test coverage detected