Hi,
thanks for all your hard work! I have replaced my initial implementation
with your patch. It is available starting with 5.7.3 (as it changes
quite a bit, it can not go immediately into the stable version). I have
removed support from v4, because the changes required are too large to
justify supporting it in v4.
So far, I have just done code review and very rough testing. I will let
the new code run in my lab within the next couple of days, but I thought
it is such a good addition that I merged it ASAP.
Thanks again for your help!
Rainer
On 12/29/2010 06:08 PM, Dražen Kačar wrote:
Rainer Gerhards wrote:
I am on vacation right now. But I think what happens is that the worker
threads inherit the priority setting from the UDP listener thread. You
probably need to change thread creation in ./runtime/wtp.c.
I hoped there would be a better method. Anyway, I've added thread
attributes in every pthread_create call, since changing just the one in
wtp.c wasn't enough.
There is one pthread_create() in plugins/imsolaris/sun_cddl.c which I
didn't touch because it seems buggy. It's using create_door_thr as
pthread_attr_t, but create_door_thr is never initialized, as far as I can
see.
The updated patch against rsyslog 5.6.2 is attached. I have only UDP
thread in real-time mode now.
I'm not sure if the code which gets the default thread properties should
go in rsyslog.c or somewhere else. It can be safely moved anywhere in the
initialization sequence, before the first pthread_create is called.
About configure check: the proper way to check for the functionality would
be to check for _XOPEN_REALTIME_THREADS preprocessor macro. That's what's
supposed to be defined if real-time thread functionality is available.
However, there is no that symbol anywhere in /usr/include on Solaris 10
(update 6 is what I checked).
The equivalent run-time check sysconf(_SC_XOPEN_REALTIME_THREADS) is
returning 1, though, so the lack of _XOPEN_REALTIME_THREADS macro is a
Solaris bug, as far as I can tell.
Therefore I'm checking for the availability of pthread_setschedparam() and
then have all real-time thread code in #ifdef HAVE_PTHREAD_SETSCHEDPARAM
blocks. It's not ideal, but I hope it works.
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com