GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Embed Notice

HTML Code

Corresponding Notice

  1. Embed this notice
    Blurry Moon (sun@shitposter.world)'s status on Sunday, 23-Feb-2025 01:41:33 JSTBlurry MoonBlurry Moon
    in reply to
    • Ignas Kiela
    @ignaloidas I am not going to say that there's no badly designed interfaces in there but the issue seems to be that everything in the kernel is in C where you have to manage a lot of stuff yourself because of decades of design decisions you can't change; and written without strongly opinionated abstraction because they can't assume how it will be used in other parts of the kernel. Here is a post by an Asahi kernel Rust dev talking about it:

    https://vt.social/@lina/113056457969145576
    In conversationabout 8 months ago from shitposter.worldpermalink

    Attachments

    1. No result found on File_thumbnail lookup.
      Asahi Lina (朝日リナ) // nullptr::live (@lina@vt.social)
      from Asahi Lina (朝日リナ) // nullptr::live
      I think people really don't appreciate just how incomplete Linux kernel API docs are, and how Rust solves part of the problem. I wrote a pile of Rust abstractions for various subsystems. For practically every single one, I had to read the C source code to understand how to use its API. Simply reading the function signature and associated doc comment (if any) or explicit docs (if you're lucky and they exist) almost never fully tells you how to safely use the API. Do you need to hold a lock? Does a ref counted arg transfer the ref or does it take its own ref? When a callback is called are any locks held or do you need to acquire your own? What about free callbacks, are they special? What's the intended locking order? Are there special cases where some operations might take locks in some cases but not others? Is a NULL argument allowed and valid usage, or not? What happens to reference counts in the error case? Is a returned ref counted pointer already incremented, or is it an implied borrow from a reference owned by a passed argument? Is the return value always a valid pointer? Can it be NULL? Or maybe it's an ERR_PTR? Maybe both? What about pointers returned via indirect arguments, are those cleared to NULL on error or left alone? Is it valid to pass a NULL ** if you don't need that return pointer?
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.