From nobody Tue Oct 05 13:08:25 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 89BD317EB86C; Tue, 5 Oct 2021 13:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HNyZK3XTdz3F5P; Tue, 5 Oct 2021 13:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 59DAE4F45; Tue, 5 Oct 2021 13:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 195D8PWC083223; Tue, 5 Oct 2021 13:08:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 195D8PwP083222; Tue, 5 Oct 2021 13:08:25 GMT (envelope-from git) Date: Tue, 5 Oct 2021 13:08:25 GMT Message-Id: <202110051308.195D8PwP083222@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: b3b15d9256cb - main - cam: Add doxygen for cam_sim_free List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b3b15d9256cbba94d509d1c8b1c5b2379f03fd26 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b3b15d9256cbba94d509d1c8b1c5b2379f03fd26 commit b3b15d9256cbba94d509d1c8b1c5b2379f03fd26 Author: Warner Losh AuthorDate: 2021-10-05 13:07:17 +0000 Commit: Warner Losh CommitDate: 2021-10-05 13:07:47 +0000 cam: Add doxygen for cam_sim_free Sponsored by: Netflix Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D32303 --- sys/cam/cam_sim.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sys/cam/cam_sim.c b/sys/cam/cam_sim.c index e7a7348d0c44..abf65965fc8e 100644 --- a/sys/cam/cam_sim.c +++ b/sys/cam/cam_sim.c @@ -127,6 +127,19 @@ cam_sim_alloc(sim_action_func sim_action, sim_poll_func sim_poll, return (sim); } +/** + * @brief frees up the sim + * + * Frees up the CAM @c sim and optionally the devq. If a mutex is associated + * with the sim, it must be locked on entry. It will remain locked on + * return. + * + * This function will wait for all outstanding reference to the sim to clear + * before returning. + * + * @param sim The sim to free + * @param free_devq Free the devq associated with the sim at creation. + */ void cam_sim_free(struct cam_sim *sim, int free_devq) {