[PATCH 10/32] lib/trank: Rearrange includes and harmonize license headers

Florian Bezdeka <[email protected]>
Newsgroups dev.linux.lists.xenomai
Message-ID <20260508-wip-flo-refactor-includes-v1-10-e449f2bd4fc2@siemens.com>
Moving from "local to global" should help us to keep headers
self-contained.

While at it: Harmonzie license headers. doxygen reported a warning
while generating the docs.

Signed-off-by: Florian Bezdeka <[email protected]>
---
 lib/trank/init.c     |  5 +++--
 lib/trank/internal.c | 12 +++++-------
 lib/trank/internal.h |  8 ++++----
 lib/trank/native.c   | 12 +++++++-----
 lib/trank/posix.c    | 16 +++++++---------
 5 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/lib/trank/init.c b/lib/trank/init.c
index cbd034e03ecfe07f0fbfd84cbb48430d97d10909..0df0f50ee235d09aabc2b6f0af5dc0f837600160 100644
--- a/lib/trank/init.c
+++ b/lib/trank/init.c
@@ -10,15 +10,16 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
-
+ *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
  */
 
-#include <xenomai/init.h>
 #include "internal.h"
 
+#include <xenomai/init.h>
+
 /**
  * @defgroup trank Transition Kit
  *
diff --git a/lib/trank/internal.c b/lib/trank/internal.c
index 391fd9a06ea2fa7c32808def587fe5d0204a06a1..bbe70c289d840c572c9fc3881f00f39e9b8bb211 100644
--- a/lib/trank/internal.c
+++ b/lib/trank/internal.c
@@ -10,21 +10,19 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
-
+ *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
  */
 
-#include <xeno_config.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <string.h>
-#include <boilerplate/signal.h>
-
 #include "cobalt/internal.h"
 #include "internal.h"
 
+#include <boilerplate/signal.h>
+
+#include <string.h>
+
 sigset_t trank_sigperiod_set;
 
 #ifdef HAVE_TLS
diff --git a/lib/trank/internal.h b/lib/trank/internal.h
index 5fd9d7ea6c6b218e6a842ad4337e5294e7fcc48d..618f7784168e17e08380b87ea9e65f285358988f 100644
--- a/lib/trank/internal.h
+++ b/lib/trank/internal.h
@@ -10,19 +10,19 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
-
+ *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
  */
+
 #ifndef _TRANK_INTERNAL_H
 #define _TRANK_INTERNAL_H
 
-#include <pthread.h>
-#include <time.h>
-#include <signal.h>
 #include <xeno_config.h>
 
+#include <pthread.h>
+
 struct trank_context {
 	timer_t periodic_timer;
 };
diff --git a/lib/trank/native.c b/lib/trank/native.c
index cacc261c7c3b3ac92b70d83e4f2f27c16da9167c..a89edd6ba9d15877833bef1efa00384b2d49ff65 100644
--- a/lib/trank/native.c
+++ b/lib/trank/native.c
@@ -10,18 +10,20 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
-
+ *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
  */
-#include <copperplate/threadobj.h>
-#include <copperplate/heapobj.h>
-#include <trank/native/task.h>
+
+#include "../alchemy/alarm.h"
+
+//#include <copperplate/heapobj.h>
+//#include <copperplate/threadobj.h>
 #include <trank/native/alarm.h>
 #include <trank/native/event.h>
 #include <trank/native/pipe.h>
-#include "../alchemy/alarm.h"
+#include <trank/native/task.h>
 
 #ifdef DOXYGEN_CPP
 
diff --git a/lib/trank/posix.c b/lib/trank/posix.c
index ddada56770f77cff00c2e2136eb99fce6f78e381..f572d7c9c4cd7d28fd3bdb1aa76840bb31e06b59 100644
--- a/lib/trank/posix.c
+++ b/lib/trank/posix.c
@@ -10,22 +10,20 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
-
+ *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
  */
-#include <xeno_config.h>
-#include <errno.h>
-#include <signal.h>
-#include <time.h>
-#include <memory.h>
-#include <boilerplate/ancillaries.h>
-#include <boilerplate/signal.h>
-#include <trank/posix/pthread.h>
+
 #include "cobalt/internal.h"
 #include "internal.h"
 
+#include <boilerplate/signal.h>
+#include <trank/posix/pthread.h>
+
+#include <memory.h>
+
 /**
  * @ingroup trank
  * @{

-- 
2.54.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.