search for: __unlikely

Displaying 9 results from an estimated 9 matches for "__unlikely".

2006 Jun 20
1
[patch] compiler.h fix use of likely/unlikely
...include/klibc/compiler.h +++ b/usr/include/klibc/compiler.h @@ -91,12 +91,12 @@ # define __mallocfunc #endif /* likely/unlikely */ -#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) -# define __likely(x) __builtin_expect((x), 1) -# define __unlikely(x) __builtin_expect((x), 0) +#if defined(__GNUC__) +# define likely(x) __builtin_expect((x), 1) +# define unlikely(x) __builtin_expect((x), 0) #else -# define __likely(x) (x) -# define __unlikely(x) (x) +# define likely(x) (x) +# define unlikely(x) (x) #endif /* Possibly unused function...
2008 Jul 21
1
Question about set_background
I've traced the code of set_background quite a bit this w.e. and was wondering what would happen in the __unlikely case where there is no background for the main menu and one for a submenu. It looks to me that when the submenu is closed, set_background will be called with new_background == NULL, that current_background != NULL inside so that there will be a strcmp(current_background, NULL) inside the...
2005 Nov 25
0
Fix syscalls with more than four arguments on parisc
...olatile("\tble 0x100(%%sr2, %%r0)\n" - : "=r" (rv) - : "r" (a0), "r" (a1), "r" (a2), "r" (a3), "r" (a4), "r" (a5) - : "%r1", "%r2", "%r29", "%r31"); - - if ( __unlikely(rv >= -4095UL) ) { - errno = -rv; - return -1L; - } else { - return (long)rv; - } -} - -
2015 Jul 11
0
EXTLINUX - GCC 5
...----------------------------- [com32/lib/jpeg/tinyjpeg.c:314] -> [com32/lib/jpeg/tinyjpeg.c:309]: (warning) Array 'DCT[64]' accessed at index 64, which is out of bounds. Otherwise condition 'j>=64' is redundant. Probably a false positive. (What is the reason of macro "__unlikely()" which is defined as "(!!(x))" ?) ----------------------------------------------------------------- [com32/lib/syslinux/pxe_dns.c:56]: (error) Uninitialized variable: q False positive. cppcheck seems to not understand the use of the return value of sscanf(). -----------------...
2013 Oct 18
1
[RFC/PATCH 2/3] core: MultiFS infrastructure added.
...ailure, returns -1; + */ +int switch_fs(const char **path) +{ + struct fs_info *fs; + + assert(path && *path); + if ((*path)[0] != '(') { + /* If so, don't need to restore chdir */ + if (this_fs == root_fs) + return 0; + + fs = root_fs; + goto ret; + } + + if (__unlikely(!get_fs_info)) { + printf("MultiFS support is not enabled!\n"); + return -1; + } + + fs = get_fs_info(path); + if (!fs) { + dprintf("MultiFS: It wasn't possible to get the proper fs!\n"); + return -1; + } +ret: + this_fs = fs; + restore_chdir_start(); +...
2015 Jul 11
3
EXTLINUX - GCC 5
> On Jul 10, 2015 5:29 PM, "poma via Syslinux" <syslinux at zytor.com> wrote: > > > The same as with the ISOLINUX, stable and git. > > Only this time has nothing to do with the menu. > > 1) EXTLINUX is no longer a discrete variant. The installer extlinux now > installs SYSLINUX. > 2) William Kensington already saw a similar behavior wherein an
2015 Sep 24
0
[PATCH] com32/disk: add UEFI support
...amp;dh); + if (EFI_ERROR(status)) { + printf("%s: failed to locate PCI device handle\n", __func__); + return -1; + } + + for (i = 0; i < DISKS_MAX && disk_dev_handles[i]; i++) { + if (disk_dev_handles[i] == dh) + break; + } + + if (__unlikely(i == DISKS_MAX)) + return 0; + + if (!disk_dev_handles[i]) + disk_dev_handles[i] = dh; + return 0; +} + +static int do_enumerate_disks(void) +{ + EFI_STATUS status; + EFI_HANDLE *bdevs = NULL; + unsigned long bdevsno = 0; + unsigned long i; + int ret = -1; + EF...
2015 Jul 22
13
[PULL 0/8] MultiFS suppport for BIOS and EFI
So last week I was wondering if XFS was still working -- even with its last on-disk structure changes -- and it _suprisingly_ worked as expected. Right, now I can finally get rid of GRUB and use Syslinux to boot my Linux on EFI from a rootfs with xfs. Shit, I have two partitions (the first one being the required ESP) so there is no way to access the other partitions since because Syslinux does not
2012 Aug 20
13
[PATCH 00/12] Multidisk support
Hello, the following patches should get multidisk access working. The syntax accepted is the following: (hdx,y)/path/to/file where x is the disk number and start at 0 and the y is the partition number starting at 1. So (hd0,1) is the first partition of the first disk. the other accepted syntax is using MBR's 32 bits disk signature so for example: (mbr:0x12345678,2)/foo/bar would address