From nobody Thu Oct 31 00:20:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1694986862; cv=none; d=zohomail.com; s=zohoarc; b=B74MWQNGELPeDCjw1CejZXelpYy7M9FRuQmeQ9DJElXad6I+UTKEJyD8siTtBI7QuJW2X/ppelSBduhLxV3TXpqAed+pW131XgWai63vOUVFL3heXW+950++KVYSuS8q9n0ygeFHiDoim786BNA7nbkiDn8zA9JjzNFjaqvMUxI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1694986862; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yw1dyfbeN3ouZtpJ+EsLMpnbrhAyvsGjO2B8aC+yH6E=; b=CQ5sSrOrm9kVr79xDee6rlreiPRXQmU9oM2uIBginNx+x9jCoPcoFAaRPEU5oqwumLCIGNGxUhxj3PUAafK4NbnaDQsUIn45REKBvJ9qiemcHzNPUrHgHJxJdN1DdX/IpRLAlx8i2btRIqwlOVXPW19mKgbwyt8f1qp/+95OWLM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1694986862136160.9508551607655; Sun, 17 Sep 2023 14:41:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qhzUS-0004W0-4W; Sun, 17 Sep 2023 17:39:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qhzUR-0004VY-5V for qemu-devel@nongnu.org; Sun, 17 Sep 2023 17:39:39 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qhzUP-0004Fb-MP for qemu-devel@nongnu.org; Sun, 17 Sep 2023 17:39:38 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-402d499580dso42001465e9.1 for ; Sun, 17 Sep 2023 14:39:37 -0700 (PDT) Received: from karim.my.domain ([197.39.215.8]) by smtp.gmail.com with ESMTPSA id n11-20020a5d484b000000b00317ddccb0d1sm10561735wrs.24.2023.09.17.14.39.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 14:39:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694986776; x=1695591576; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yw1dyfbeN3ouZtpJ+EsLMpnbrhAyvsGjO2B8aC+yH6E=; b=VXVOWguCbuNLkdlaED0NqMwhNQ4gRCySgcOkC+Xv44hOYezLelmARX6UZbex3rx4RO wA87j/u396SX7qVOBhutS0KGpkqLVR1l+tqRwQDDfypju2u+AkkdoSGrqJkK7tYThtM+ pW+DbwLrM5QSIaKNQabh5s5H2II73dv9ugGM0dlwQVKwAKIFh1R/SLeyfX6a28rcCRkw 9c0RsCbVJt/qDF8Y6c1lKlMa4E/5yH3MjMXtxdsHRcagq0OZzsDqz11uuLDUImaq3dOL 4Jh/bpR/1DRYMgPzeMfge5vins0OVrzGgP9GbRW3zGY3XxIlHk//QJWpUOywOj3MzTWC 1hLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694986776; x=1695591576; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yw1dyfbeN3ouZtpJ+EsLMpnbrhAyvsGjO2B8aC+yH6E=; b=AREE7MsUrO5jzfv0PiKRqBbLHyoMniZr32rUlxRN668VffLs6p9gUu3XhcFWwQSSwt PqgVWlUnHqMvXRxblNgR0/7hOHjc4VrMpf7R04UAnkxqub2+/d3gIWgBDTij4YQZ3WEY zypFwygpTTofyqOIdc3gY1Tlzf0Meu5POPpxtTZHCassbEPz8RpJ1WangSxKMXNsxVrx cnJ4R9YGZGOyUeFNOWnBssBDqQyx4pc3j+avdM+h6am3q6hG3fOgeawJY50Q6BE5GiEK Cla0zWFwYDsji+70bpvADkTZdJOxCqOUFfLljniVQrm2wwUihf2IntYXauQC+6iBdgXt H5PA== X-Gm-Message-State: AOJu0Yyd1b23pX+8uOGKo61loO+U31j6iadCygd1hL+aPYRtCLjnIK0x FJHqRfzXfUhEu6RyY7yX4VZSaM8pBjs= X-Google-Smtp-Source: AGHT+IG4ATdtN1ghyB3V/fwnYaMS8NyjA13exQYG25oG8rf/YvBQMStTCF1J5dSbeuy+w6Dq+351ZA== X-Received: by 2002:adf:e748:0:b0:31f:e759:d68e with SMTP id c8-20020adfe748000000b0031fe759d68emr5877417wrn.58.1694986775613; Sun, 17 Sep 2023 14:39:35 -0700 (PDT) From: Karim Taha To: qemu-devel@nongnu.org Cc: imp@bsdimp.com, Richard Henderson , Stacey Son , Karim Taha Subject: [PATCH v2 07/28] bsd-user: Implement target_to_host_rlim and host_to_target_rlim conversion. Date: Mon, 18 Sep 2023 00:37:42 +0300 Message-ID: <20230917213803.20683-8-kariem.taha2.7@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230917213803.20683-1-kariem.taha2.7@gmail.com> References: <20230917213803.20683-1-kariem.taha2.7@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=kariem.taha2.7@gmail.com; helo=mail-wm1-x32b.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1694986863256100002 Content-Type: text/plain; charset="utf-8" From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh --- bsd-user/bsd-proc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bsd-user/bsd-proc.c b/bsd-user/bsd-proc.c index 68410a0aa9..19e39a2f76 100644 --- a/bsd-user/bsd-proc.c +++ b/bsd-user/bsd-proc.c @@ -38,3 +38,13 @@ int target_to_host_resource(int code) return code; } =20 +rlim_t target_to_host_rlim(abi_llong target_rlim) +{ + return tswap64(target_rlim); +} + +abi_llong host_to_target_rlim(rlim_t rlim) +{ + return tswap64(rlim); +} + --=20 2.42.0