| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
It's a pity that even with this patch we still are fare away from having
the whole API documented. However, at least we have a more solid
foundation. Updates not only extend the documentation, but also make
sure it is rendered properly in the doxygen HTML.
Change-Id: I1344bd1a6869fb00de7c1899a8db93bba9bafce3
|
|
|
|
|
|
|
|
|
| |
We have to #include <sys/select.h> inside the block protected by
HAVE_SYS_SELECT_H, otherwise it will fail on (embedded) builds where
that file doesn't exist, such as the arm-none-eabi target on Debian
stable and Ubuntu 16.04.
Change-Id: I82a2dcbc55b6ee0e914881c5e09b80506c5de4f2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of returning maxfd, which is the highest fd ever seen, take
the highest we have seen on this iteration.
This makes a tiny difference for the osmo-sip-connector and its
event loop integration. select.c ignores the return value of this
function right now.
This was seen while debugging the eventloop integration of the
osmo-sip-connector before and after a VTY connection. The fds
being polled didn't go down.
Change-Id: I1a6d7271273ec08bb511c21b936891bc508843e4
|
|
|
|
|
|
|
|
|
|
|
|
| |
osmo_fd_register() is used to register socket file descriptors,
after registering a socket, there is no way to test if the socket
is still registered or actually registered at all.
This commit adds a new function osmo_fd_register_check() that can
be used to check in advance, if the socket fd is registered,
before performing further operations.
Change-Id: I48ec7098d6bba586c81bf0d5c9088108e2c081c6
|
|
|
|
|
|
|
| |
osmo_timers_check() does nothing more than counting the active timers. It is of
no use to count them when not using the return value in any way.
Change-Id: I8d35ca90a4c16d6f1c7f9793d663e5479783efed
|
|
|
|
|
| |
This adds and improves doxygen API descriptions all over libosmocore,
reducing the 'white spots' that don't have any documentation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To integrate with an external event loop (in this case glib) we
need to allow an application to get a filled out fd_set and then
dispatch it. osmo_fds and maxfds are static and I decided to keep
it that way and instead create two routines to fill the fdset and
then one to dispatch the result.
The public header file does not include sys/select.h and we can
compile the library without select, so I didn't want to require
having to include this file, and used void * for the parameter.
Mark the routines as inline to avoid a call from the select
function. I have confirmed that inlining has an effect on x86
using Debian's gcc-4.9.2-10 compiler
|
|
|
|
|
|
| |
This function can be used to obtain the osmo_fd corresponding to a given
fd. The latter can be useful when integrating libosmocore main loop
with other libraries.
|
|
|
|
| |
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
|
|
|
|
| |
This is needed on Nuttx.
|
| |
|
|
|
|
| |
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Summary of changes:
s/struct bsc_fd/struct osmo_fd/g
s/bsc_register_fd/osmo_fd_register/g
s/bsc_unregister_fd/osmo_fd_unregister/g
s/bsc_select_main/osmo_select_main/g
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary of changes:
s/struct timer_list/struct osmo_timer_list/g
s/bsc_add_timer/osmo_timer_add/g
s/bsc_schedule_timer/osmo_timer_schedule/g
s/bsc_del_timer/osmo_timer_del/g
s/bsc_timer_pending/osmo_timer_pending/g
s/bsc_nearest_timer/osmo_timers_nearest/g
s/bsc_prepare_timers/osmo_timers_prepare/g
s/bsc_update_timers/osmo_timers_update/g
s/bsc_timer_check/osmo_timers_check/g
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch moves all GSM-specific definitions to include/osmocom/gsm.
Moreover, the headers in include/osmocore/ have been moved to
include/osmocom/core.
This has been proposed by Harald Welte and Sylvain Munaunt.
Tested with `make distcheck'.
Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
|
| |
|
|
|
|
|
|
|
| |
bsc_register_fd on an already registered fd can corrupt the list
in a heavy way and make the select end in an infinite loop, this
code will workaround the issue and provide a way to set a breakpoint
at the right position in the code.
|
|
|
|
|
|
|
| |
Right now I'm seeing crashes when removing a link and deleting
it and I need this hack to make it not crash. We will have to
understand if llist_for_each_entry_safe has a bug or if we are
doing something bad with the list (anchors not properly initialized).
|
| |
|
|
|