From owner-freebsd-questions@freebsd.org Fri Oct 2 19:53:25 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DDD7A0E248 for ; Fri, 2 Oct 2015 19:53:25 +0000 (UTC) (envelope-from merritt.alex@gmail.com) Received: from mail-yk0-x232.google.com (mail-yk0-x232.google.com [IPv6:2607:f8b0:4002:c07::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DD321846 for ; Fri, 2 Oct 2015 19:53:25 +0000 (UTC) (envelope-from merritt.alex@gmail.com) Received: by ykdz138 with SMTP id z138so120705481ykd.2 for ; Fri, 02 Oct 2015 12:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=VAC4r67SHpMfi14APpqcjVwzVxZMvbWyn3bSg7oYL7U=; b=nm88Dd9Zt1ZLbD0bsWY4E8uhU2ku0s5PfevTFxtixSNCLHMO9K7PxtYIx1hKjR6jS/ 7/MswiR9UXkTZ2M6pNY7Rqe4DhFdezgBK+ufXQ1lO3pAzgUiXsXepFlxw2wIAf2jc+h4 7tgG16xquN3Z8dqtOPujCLAKZJ3ROghwQH5rUh9Up5Wc7Y6+PDYkkcVaEmwLYv99ebLz 01XB1R9VrzYl5G9vbXNZjkaP8JGZtkdJSL2Y4oOEJ4fJSW1sm3g574srwIhKmf3akqR0 z+5NlkczKBQ+Al9ygnrP+C0vP4knlxQ0Pqwx7dx32lvLsOX0BVWwqftZk7nlljbHvsvN 6nOg== X-Received: by 10.129.48.86 with SMTP id w83mr15188314yww.105.1443815604436; Fri, 02 Oct 2015 12:53:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.2.194 with HTTP; Fri, 2 Oct 2015 12:52:55 -0700 (PDT) In-Reply-To: <560D2242.1010908@fjl.co.uk> References: <560D2242.1010908@fjl.co.uk> From: Alex Merritt Date: Fri, 2 Oct 2015 15:52:55 -0400 Message-ID: Subject: Re: WTFM for system calls To: Frank Leonhardt Cc: "freebsd-questions@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Oct 2015 19:53:25 -0000 On Thu, Oct 1, 2015 at 8:08 AM, Frank Leonhardt wrote: > It's probably obvious, but not quite obvious enough for me right now... > > Where's there a list of FreeBSD kernel (system) calls? > This would be sys/syscall.h as you pointed out, a very bare-bones list. > There's obviously man 2, but you really need to know the name of what > you're looking for (or guess from the file names). I could also scan > through the 'C' header files. > apropos(1) is useful for searching when you don't have exact names. > The Developer's Manual mentions HOW to call a system call (and told me > something shocking about Linux I hadn't realised). But nowhere can I find a > list - preferably sorted in to sections with a summary, function number, > symbolic name, and list of parameters. I'm looking for something a bit more > informative than sys/syscall.h! > sys/sysproto.h has the arguments and prototypes Implementations have the format sys_NAME where name is mmap, open, etc. Inline comments may exist above each system call's implementation. I find The Silver Searcher [1] to be quiet useful. From the source directory, "ag sys_open" will return results very quickly. [1] http://geoff.greer.fm/ag/ I bet someone's going to refer me to a man page with a name everyone else > knows but I couldn't guess. Counting down.... > > Thanks, Frank. >