Git Product home page Git Product logo

Comments (3)

medvednikov avatar medvednikov commented on May 26, 2024

Wrong repo? :)

from ved.

medvednikov avatar medvednikov commented on May 26, 2024

Try asking on discord, I don't have any experience with drivers.

Basically everything is the same if you were writing them in C.

from ved.

dgutson avatar dgutson commented on May 26, 2024

Wrong repo? :)

Why? :)

I understand that everything is the same as if you were writing in C. But you can't program kernel modules in regular C, because of the C standard library, which assumes there is a kernel thus they can call syscalls; in a kernel module, the module "is" the kernel (actually part of it), so it can't use the kernel userspace API because it's inside.
This being said, what is necessary for V to work is to avoid using the glibc, but using a subset of functionalities instead (as C is already limited for kernel dev in terms of library). Writing a kernel module in C also requires a set of command line flags for both the compiler and the linker.

So, there could be a command line switch in the V compiler such as "-kernel" that would: 1) add the command line flags to the C compiler and linker so it generates a .ko; 2) restrict the language if there are features that cannot be used in kernel mode (I didn't see any yet); 3) use an alternative library implementation that doesn't invoke syscalls.

from ved.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.