Skip to contentSkip to conversation

rt-puts fix, mprotect testsuite

GIT PULL Jan Kiszka 2 participants 7 messages Apr 4, 2012 – Apr 15, 2012

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

The following changes since commit 0ef2410a2c9cf7102dead861241bd2d9957e4433:

Mask signals in rt_print:printer_loop() (2012-04-02 00:16:41 +0200)

are available in the git repository at:
git://git.xenomai.org/xenomai-jki.git for-upstream

Jan Kiszka (3):
Append missing newline to rt_[f]puts output
testsuite: Add rt-print buffer flushes to native error paths Add regression test for mprotect on pinned memory

 src/skins/common/rt_print.c                |    7 ++-
 src/testsuite/regression/native/check.h    |    2 +
 src/testsuite/regression/native/leaks.c    |    1 +
 src/testsuite/regression/posix/Makefile.am |    2 +-
 src/testsuite/regression/posix/Makefile.in |   15 ++++-
 src/testsuite/regression/posix/check.h     |   10 +++
 src/testsuite/regression/posix/mprotect.c  |   97 ++++++++++++++++++++++++++++
 7 files changed, 129 insertions(+), 5 deletions(-)
 create mode 100644 src/testsuite/regression/posix/mprotect.c
#1 lore raw
Quoted 10 lines · Jan Kiszka

The following changes since commit 0ef2410a2c9cf7102dead861241bd2d9957e4433:

Mask signals in rt_print:printer_loop() (2012-04-02 00:16:41 +0200)

are available in the git repository at:
git://git.xenomai.org/xenomai-jki.git for-upstream

Jan Kiszka (3):
Append missing newline to rt_[f]puts output
testsuite: Add rt-print buffer flushes to native error paths

As I said, I do not agree with calling rt_print_flush_buffers outside of xenomai libs. If you want to avoid the issue you should use rt_printf only.

Signature · 1 line
					    Gilles.
author
#2 lore raw
Quoted 8 lines · Gilles Chanteperdrix
Quoted 7 lines · Jan Kiszka

The following changes since commit 0ef2410a2c9cf7102dead861241bd2d9957e4433:

Mask signals in rt_print:printer_loop() (2012-04-02 00:16:41 +0200)

are available in the git repository at:
git://git.xenomai.org/xenomai-jki.git for-upstream

Quoted 6 lines
Quoted 3 lines

Jan Kiszka (3):
Append missing newline to rt_[f]puts output
testsuite: Add rt-print buffer flushes to native error paths

As I said, I do not agree with calling rt_print_flush_buffers outside of xenomai libs.

rt_print_flush_buffers is a Xenomai API function that we export for quite a while now. The rt_* functions are about explicit control when what is invoked, both in the native skin and in what used to be rtdk. Also, you can't avoid this function when you interact with libraries that are unwrapped.

That said, I can fix that minor issue in leaks differently if you insist.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
#3 lore raw
Quoted 16 lines · Jan Kiszka
Quoted 8 lines · Gilles Chanteperdrix
Quoted 7 lines · Jan Kiszka

The following changes since commit 0ef2410a2c9cf7102dead861241bd2d9957e4433:

Mask signals in rt_print:printer_loop() (2012-04-02 00:16:41 +0200)

are available in the git repository at:
git://git.xenomai.org/xenomai-jki.git for-upstream

Quoted 6 lines
Quoted 3 lines

Jan Kiszka (3):
Append missing newline to rt_[f]puts output
testsuite: Add rt-print buffer flushes to native error paths

As I said, I do not agree with calling rt_print_flush_buffers outside of xenomai libs.

Quoted 7 lines

rt_print_flush_buffers is a Xenomai API function that we export for quite a while now. The rt_* functions are about explicit control when what is invoked, both in the native skin and in what used to be rtdk. Also, you can't avoid this function when you interact with libraries that are unwrapped.

That said, I can fix that minor issue in leaks differently if you insist.

I added rt_print_flush_buffers for xenomai 2.6.0, in order to implement systematic wrapping of printf by the posix skin, my intent was not to really export it. From my point of view, having to call this flush function all over the place reveals a problem in the application. If you use always printf or always rt_printf, you do not need to call this function.

Signature · 1 line
					    Gilles.
author
#4 lore raw
Quoted 23 lines · Gilles Chanteperdrix
Quoted 22 lines · Jan Kiszka
Quoted 8 lines · Gilles Chanteperdrix
Quoted 7 lines · Jan Kiszka

The following changes since commit 0ef2410a2c9cf7102dead861241bd2d9957e4433:

Mask signals in rt_print:printer_loop() (2012-04-02 00:16:41 +0200)

are available in the git repository at:
git://git.xenomai.org/xenomai-jki.git for-upstream

Quoted 6 lines
Quoted 3 lines

Jan Kiszka (3):
Append missing newline to rt_[f]puts output
testsuite: Add rt-print buffer flushes to native error paths

As I said, I do not agree with calling rt_print_flush_buffers outside of xenomai libs.

rt_print_flush_buffers is a Xenomai API function that we export for quite a while now. The rt_* functions are about explicit control when what is invoked, both in the native skin and in what used to be rtdk. Also, you can't avoid this function when you interact with libraries that are unwrapped.

Quoted 8 lines
Quoted 1 line

That said, I can fix that minor issue in leaks differently if you insist.

I added rt_print_flush_buffers for xenomai 2.6.0, in order to implement systematic wrapping of printf by the posix skin, my intent was not to really export it. From my point of view, having to call this flush function all over the place reveals a problem in the application. If you use always printf or always rt_printf, you do not need to call this function.

Still, there are those use cases where you cannot replace the print functions. So it remains useful.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
#5 lore raw
In reply to Jan Kiszka
Quoted 11 lines · Jan Kiszka

The following changes since commit 0ef2410a2c9cf7102dead861241bd2d9957e4433:

Mask signals in rt_print:printer_loop() (2012-04-02 00:16:41 +0200)

are available in the git repository at:
git://git.xenomai.org/xenomai-jki.git for-upstream

Jan Kiszka (3):
Append missing newline to rt_[f]puts output
testsuite: Add rt-print buffer flushes to native error paths Add regression test for mprotect on pinned memory

Merged. Thanks.

Signature · 1 line
                                                                Gilles.
#6 lore raw
In reply to Jan Kiszka
Quoted 9 lines · Jan Kiszka

The following changes since commit 0ef2410a2c9cf7102dead861241bd2d9957e4433:

Mask signals in rt_print:printer_loop() (2012-04-02 00:16:41 +0200)

are available in the git repository at:
git://git.xenomai.org/xenomai-jki.git for-upstream

Jan Kiszka (3):
Append missing newline to rt_[f]puts output

Actually, only puts requires an additional newline, not fputs.

Signature · 1 line
                                                                Gilles.