.. include:: Agenda: (Linux) Systems Programming With C++ ============================================ Three days of systems programming, interwoven with select C++ topics. (Linux) Systems Programming --------------------------- .. topic:: All slide material * :doc:`/trainings/material/soup/linux/sysprog/index` This is probably a bit too much for a three day course to present in detail; lets see what can be omitted. * Basics * :doc:`/trainings/material/soup/linux/sysprog/file-io/index` * :doc:`/trainings/material/soup/linux/sysprog/process/index`. Can be reduced to a minimum. **Zephyr does not have processes, at least not the Linux way**. * :doc:`/trainings/material/soup/linux/sysprog/signals/index`. **Is there such a thing on Zephyr?** * :doc:`/trainings/material/soup/linux/sysprog/timers/index`. Core topic is that timers add weird notification features that add multiple dimensions of complexity. **How's that on Zephyr?** * Hardware interfaces: GPIO (``libgpiod``), :doc:`I2C `, SPI, :doc:`PWM `, :doc:`HWMON `. **This has nothing to do with Zephyr**. * Event loops: ``select()``, ``poll()``, ``epoll()`` * :doc:`/trainings/material/soup/linux/sysprog/eventloop/problem/index` * :doc:`/trainings/material/soup/linux/sysprog/eventloop/poll/index` * :doc:`/trainings/material/soup/linux/sysprog/eventloop/poll-cpp/index` * :doc:`/trainings/material/soup/linux/sysprog/eventloop/exercise-graceful-termination/index` * :doc:`/trainings/material/soup/linux/sysprog/eventloop/exercise-commit-rollback/index` * Maybe have a short look into Python's ``asyncio`` framework. Maybe only after we have looked into threading. * Memory Management/mmap(). **Can Zephyr use an MMU, and how?** * :doc:`Scheduling and realtime, and priority inversion `. Fun: :doc:`/trainings/material/soup/linux/sysprog/scheduling/mars-pathfinder` * IPC: message queues, POSIX shared memory, POSIX semaphores. **How's that on Zephyr? Inter Process Communication without processes** * Multithreading; cover :doc:`POSIX threads ` and :doc:`C++ threads ` in parallel * :doc:`POSIX threads `, vs. :doc:`C++ threads ` * :doc:`C++ memory model ` **Very good a-ha** * :doc:`POSIX mutexes ` vs. :doc:`C++ mutexes ` and :doc:`scoped locking ` * :doc:`POSIX condition variables ` vs. :doc:`C++ condition variables ` and :doc:`C++ promise/future ` * :doc:`/trainings/material/soup/linux/sysprog/scheduling/index` C++ --- .. topic:: All slide material * :doc:`/trainings/material/soup/cxx/cxx11/index` Don't present explain basics like :doc:`range-for `, or :doc:`auto `, or :doc:`/trainings/material/soup/cxx/cxx11/structured-binding/topic` - just use them in live-hacking sessions. Likewise, stay away from niche/advanced features like :doc:`coroutines `, or :doc:`"deducing this" `. Proposed topics (apart from those already touched during Systems Programming) ... * :doc:`/trainings/material/soup/cxx/cxx11/smart-pointers/index` (``std::unique_ptr`` usage requires a bit of move-understanding, so this is a good intro) * :doc:`/trainings/material/soup/cxx/cxx11/rule-of-5/topic`, including *move*. There is a separate :doc:`slide deck on move here `. * :doc:`/trainings/material/soup/cxx/cxx11/lambda/index` * :doc:`/trainings/material/soup/cxx/cxx11/perfect-forwarding/topic` * :doc:`/trainings/material/soup/cxx/cxx11/ranges/index` * :doc:`/trainings/material/soup/cxx/cxx11/concepts/index` * Show creative ``auto`` usage: *Abbreviated function templates*