HOMEVIDEOSCOURSESSTUDENTSSPONSORSDONATIONSEVENTSTUTORIALSLINKSNEWSCONTACT


VIDEOS 》 Inline Programming | Assembly | Scripts | php, python, shell, etc | Rust in Linux Kernel

Inline programming is a technique where code statements are included directly in the text of a program, instead of being contained in separate files or modules. Inline programming can be useful for small or simple tasks, as it can eliminate the need for a separate script or function. One common example of inline programming is using JavaScripts, Php, etc in HTML documents to create dynamic content. In this case, the JavaScript/php code is written directly in the HTML code. Inline programming can also be used in other programming languages, such as C, Python, Php and Ruby. For example, Python allows for inline scripting using the exec() function, which allows code to be executed directly from a string. This can be useful for small scripts or prototyping, but should be used with caution as it can introduce security risks if the code is not properly sanitized. Similarly in Linux Kernel we can find lot of instances where we can find inline programming such as inline assembly and now Rust within the Kernel source. Inline Assembly is popular to optimize various fundamental APIs such as memcpy, memcmp, strcpy, strcmp, etc. Since these APIs are fundamental and are used all around the kernel, optimizations done on such APIs will result in great run-time performance of the overall system. So, inline programming can be a useful technique for simplifying small or simple tasks, but should be used judiciously and with caution in more complex scenarios.

Here is my a detailed video episode on Inline Programming particularly in Linux Kernel source.