Re: [sr-dev] [kamailio/kamailio] async: added support for millisecond resolution sleep (#2016)

2019-07-28 Thread Paweł Pierścionek
@urtho pushed 1 commit. 96c8fe5a8e66a70649d69bc98f210050c59df4bd sync: added support for millisecond resolution sleep -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/kamailio/kamailio/pull/2016/files/f368a3ec44ca785bc1eca64dff2b70a9e6

Re: [sr-dev] [kamailio/kamailio] async: added support for millisecond resolution sleep (#2016)

2019-07-28 Thread Paweł Pierścionek
I have all the fixes. Do I open a new pull req or push changes to this one with the same commit message ? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/2016#issuecomment-515756928_

Re: [sr-dev] [kamailio/kamailio] async: added support for millisecond resolution sleep (#2016)

2019-07-28 Thread Paweł Pierścionek
urtho commented on this pull request. > + t = tmb.t_gett(); + if(t == NULL || t == T_UNDEFINED) { + if(tmb.t_newtran(msg) < 0) { + LM_ERR("cannot create the transaction\n"); + return -1; + } + t = tmb

Re: [sr-dev] [kamailio/kamailio] async: added support for millisecond resolution sleep (#2016)

2019-07-28 Thread Paweł Pierścionek
urtho commented on this pull request. > + ai = (async_ms_item_t *) ((char *)at + sizeof(async_task_t) + > sizeof(async_task_param_t)); + ai->at = at; + + if(cbname && cbname->len>=ASYNC_CBNAME_SIZE-1) { + LM_ERR("callback name is too long: %.*s\n", cbname->len, c

Re: [sr-dev] [kamailio/kamailio] async: added support for millisecond resolution sleep (#2016)

2019-07-28 Thread Paweł Pierścionek
urtho commented on this pull request. > + return -1; + } + memset(at, 0, dsize); + at->param = (char *)at + sizeof(async_task_t); + atp = (async_task_param_t *)at->param; + ai = (async_ms_item_t *) ((char *)at + sizeof(async_task_t) + sizeof(async_task

Re: [sr-dev] [kamailio/kamailio] async: added support for millisecond resolution sleep (#2016)

2019-07-28 Thread Paweł Pierścionek
urtho commented on this pull request. > + return -1; + } + dsize = sizeof(async_task_t) + sizeof(async_task_param_t) + sizeof(async_ms_item_t); + + at = (async_task_t *)shm_malloc(dsize); + if(at == NULL) { + LM_ERR("no more shm memory\n"); +

Re: [sr-dev] [kamailio/kamailio] async: added support for millisecond resolution sleep (#2016)

2019-07-28 Thread Paweł Pierścionek
urtho commented on this pull request. > + sizeof(struct async_ms_list)); + if(_async_ms_list == NULL) { + LM_ERR("no more shm\n"); + return -1; + } + memset(_async_ms_list, 0, sizeof(struct async_ms_list)); + if(lock_init(&_

[sr-dev] [kamailio/kamailio] async: added support for millisecond resolution sleep (#2016)

2019-07-27 Thread Paweł Pierścionek
Type Of Change - [X] New feature (non-breaking change which adds new functionality) Checklist: - [ ] PR should be backported to stable branches - [X] Tested changes locally Description - new ms_timer parameter to enable millisecond precision timer - new async_ms_route and async_ms_

Re: [sr-dev] [kamailio/kamailio] Microsleep (#2008)

2019-07-27 Thread Paweł Pierścionek
Closed #2008. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/2008#event-2514419155___ Kamailio (SER) - Development Mailing List sr-dev@lis

Re: [sr-dev] [kamailio/kamailio] Microsleep (#2008)

2019-07-27 Thread Paweł Pierścionek
@urtho pushed 1 commit. ce3e07690be4c3396f0c54cf8bbe701d1168a9cd module param + docs -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/kamailio/kamailio/pull/2008/files/004ad28feac133f017eb2d6c155be91c491558c4..ce3e07690be4c3396f0c54cf8b

[sr-dev] [kamailio/kamailio] Microsleep (#2008)

2019-07-15 Thread Paweł Pierścionek
This is a ringless implementation of millisecond precision timer and millisecond async_sleep function. I've added the functionality to the current async mod but this can me moved to a dedicated module. For now only the async_ms_sleep is implemented but async_ms_route is just a few lines. Anyw

[sr-dev] [kamailio/kamailio] async sleep with millisecond precision (#2006)

2019-07-14 Thread Paweł Pierścionek
Hi, I've implemented a ringless millisecond async sleep using sorted linked list and 1 millisecond timer. Timer queues tasks that are due for execution with async_task_push. https://github.com/urtho/kamailio/tree/microsleep If this is worth including in the master then I can do comments, docs