From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) by sourceware.org (Postfix) with ESMTPS id C645B385E012 for ; Wed, 11 May 2022 07:08:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C645B385E012 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=arndb.de Received: from mail-yw1-f177.google.com ([209.85.128.177]) by mrelayeu.kundenserver.de (mreue010 [213.165.67.97]) with ESMTPSA (Nemesis) id 1MiJEc-1oKC4A3kGM-00fVSI for ; Wed, 11 May 2022 09:08:53 +0200 Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-2ebf4b91212so10116507b3.8 for ; Wed, 11 May 2022 00:08:52 -0700 (PDT) X-Gm-Message-State: AOAM532DAzMA9xkE8VVmt99qIK3Ig47bg5mtdB3WM/q+1Ws6Puv169GV +Cdcg011rbg9xU6uf/MkVFFklHBQVaR80sxYoII= X-Google-Smtp-Source: ABdhPJyj2xqkut1RvTh5dvYUe7eNcQ0cu24qpyc2HKJWGEA0e+rk6M52aWoKKHmDNjybli/I3yskLZEAeADI0NNtPqY= X-Received: by 2002:a81:9213:0:b0:2f6:eaae:d22f with SMTP id j19-20020a819213000000b002f6eaaed22fmr24153468ywg.249.1652252931467; Wed, 11 May 2022 00:08:51 -0700 (PDT) MIME-Version: 1.0 References: <20220509022611.1248063-1-caiyinyu@loongson.cn> <20220509022611.1248063-10-caiyinyu@loongson.cn> In-Reply-To: <20220509022611.1248063-10-caiyinyu@loongson.cn> From: Arnd Bergmann Date: Wed, 11 May 2022 09:08:34 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 09/13] LoongArch: Linux ABI To: caiyinyu Cc: GNU C Library , xuchenghua@loongson.cn, joseph_myers@mentor.com Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:tGzfvRrNJ+eU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jQYP4hsby EaXXpFUX/50SYshN8BZwTEYtQQNb+zwlcp6QQqClxhvkIT+5Mw= X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 May 2022 07:08:56 -0000 On Mon, May 9, 2022 at 4:26 AM caiyinyu wrote: > + > +#include > + > +/* In 64-bit ISA files are always with 64bit off_t and F_*LK64 are the same as > + non-64-bit versions. It will need to be revised for 128-bit. */ > +#if __WORDSIZE == 64 > +#define __O_LARGEFILE 0 > + > +#define F_GETLK64 5 /* Get record locking info. */ > +#define F_SETLK64 6 /* Set record locking info (non-blocking). */ > +#define F_SETLKW64 7 /* Set record locking info (blocking). */ > +#endif > + > +struct flock > +{ > + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ > + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ > +#ifndef __USE_FILE_OFFSET64 > + __off_t l_start; /* Offset where the lock begins. */ > + __off_t l_len; /* Size of the locked area; zero means until EOF. */ > +#else > + __off64_t l_start; /* Offset where the lock begins. */ > + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ > +#endif > + __pid_t l_pid; /* Process holding the lock. */ > +}; > + > +#ifdef __USE_LARGEFILE64 > +struct flock64 > +{ > + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ > + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ > + __off64_t l_start; /* Offset where the lock begins. */ > + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ > + __pid_t l_pid; /* Process holding the lock. */ > +}; > +#endif Not sure why these are provided here, the kernel has no loongarch64 specific interface for flock in the current version, so either this refers to an older version of the kernel port, or it is something that could be generalized into an architecture-independent file in glibc. Arnd