https://github.com/torvalds/linux
Raw File
Tip revision: 90d35da658da8cff0d4ecbb5113f5fac9d00eb72 authored by Linus Torvalds on 03 March 2024, 21:02:52 UTC
Linux 6.8-rc7
Tip revision: 90d35da
checksum_64.h
/*
 * Licensed under the GPL
 */

#ifndef __UM_SYSDEP_CHECKSUM_H
#define __UM_SYSDEP_CHECKSUM_H

static inline unsigned add32_with_carry(unsigned a, unsigned b)
{
        asm("addl %2,%0\n\t"
            "adcl $0,%0"
            : "=r" (a)
            : "0" (a), "r" (b));
        return a;
}

extern __sum16 ip_compute_csum(const void *buff, int len);

#endif
back to top