[riot-notifications] [RIOT] sys: factor stdio uart functions out of newlib's syscalls (#3161)

Hauke Petersen notifications at github.com
Thu Jun 4 18:02:56 CEST 2015


I look at it the following way: Take e.g. the `_read_r()` function in the syscalls. Currently it calls `uart_stdio_read()`. Say there is now another stdio implementation with the function `socket_stdio_read()`. When you want to switch to this, you would have another `_read_r()` function that calls `socket_stdio_read()`, or have some `#ifdef` inside `_read_r()` to decide which of the two above to call.

When now renaming the interace functions to something without the reference to its implementation (e.g. `stdio_read()` or similar), then you can just compile in one of the implementing modules and there is no need in code changes (or `#ifedfs`) in `syscalls.c`.

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/3161#issuecomment-108948941
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20150604/318f41d6/attachment.html>


More information about the notifications mailing list