Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PolyORB-HI-C
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TASTE
PolyORB-HI-C
Commits
47796aa2
Commit
47796aa2
authored
Jul 03, 2017
by
yoogx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Change base type to index messages in queue to support
larger queue size For issue openaadl/ocarina#97
parent
6d24ad6a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
63 deletions
+65
-63
examples/aadlv2/producer-consumer/Makefile.am
examples/aadlv2/producer-consumer/Makefile.am
+1
-1
include/po_hi_gqueue.h
include/po_hi_gqueue.h
+14
-14
include/po_hi_types.h
include/po_hi_types.h
+3
-1
src/po_hi_gqueue.c
src/po_hi_gqueue.c
+47
-47
No files found.
examples/aadlv2/producer-consumer/Makefile.am
View file @
47796aa2
...
...
@@ -9,4 +9,4 @@ include $(srcdir)/../../Makefile.common
EXTRA_DIST
=
$(AADL_FILES)
$(SCENARIO_FILES)
$(C_FILES)
CLEANDIRS
=
pc_simple_impl
CLEANDIRS
=
pc_simple_impl
pc_simple_local pc_simple_rtems
include/po_hi_gqueue.h
View file @
47796aa2
...
...
@@ -5,7 +5,7 @@
*
* For more informations, please visit http://taste.tuxfamily.org/wiki
*
* Copyright (C) 2007-2009 Telecom ParisTech, 2010-201
4
ESA & ISAE.
* Copyright (C) 2007-2009 Telecom ParisTech, 2010-201
7
ESA & ISAE.
*/
#ifndef __PO_HI_GQUEUE_H__
...
...
@@ -24,19 +24,19 @@
#include <po_hi_types.h>
void
__po_hi_gqueue_init
(
__po_hi_task_id
id
,
__po_hi_
uint8_t
nb_ports
,
__po_hi_
port_id_t
nb_ports
,
__po_hi_port_t
queue
[],
__po_hi_
int8_t
sizes
[],
__po_hi_
uint8_t
first
[],
__po_hi_
uint8_t
offsets
[],
__po_hi_
uint8_t
woffsets
[],
__po_hi_
uint8_t
n_dest
[],
__po_hi_
port_id_t
sizes
[],
__po_hi_
port_id_t
first
[],
__po_hi_
port_id_t
offsets
[],
__po_hi_
port_id_t
woffsets
[],
__po_hi_
port_id_t
n_dest
[],
__po_hi_port_t
*
destinations
[],
__po_hi_
uint8_t
used_size
[],
__po_hi_
port_id_t
used_size
[],
__po_hi_local_port_t
history
[],
__po_hi_request_t
recent
[],
__po_hi_
uint8_t
empties
[],
__po_hi_uint
16
_t
total_fifo_size
);
__po_hi_
port_id_t
empties
[],
__po_hi_uint
32
_t
total_fifo_size
);
/*
* Initialize a global queue. In a distributed system, each task has
* its own global queue. This function is invoked by each thead to
...
...
@@ -116,7 +116,7 @@ void __po_hi_gqueue_wait_for_incoming_event(__po_hi_task_id id,
* the event.
*/
__po_hi_
uint8
_t
__po_hi_gqueue_store_in
(
__po_hi_task_id
id
,
__po_hi_
port_id
_t
__po_hi_gqueue_store_in
(
__po_hi_task_id
id
,
__po_hi_local_port_t
port
,
__po_hi_request_t
*
request
);
/*
...
...
@@ -144,7 +144,7 @@ uint8_t __po_hi_gqueue_get_destinations_number (const __po_hi_task_id task_id,
* identifier for the local thread.
*/
__po_hi_
int8
_t
__po_hi_gqueue_get_port_size
(
const
__po_hi_task_id
id
,
__po_hi_
port_id
_t
__po_hi_gqueue_get_port_size
(
const
__po_hi_task_id
id
,
const
__po_hi_local_port_t
port
);
/*
...
...
@@ -153,9 +153,9 @@ __po_hi_int8_t __po_hi_gqueue_get_port_size(const __po_hi_task_id id,
* identifier for the local thread.
*/
__po_hi_
int8
_t
__po_hi_gqueue_used_size
(
__po_hi_task_id
id
,
__po_hi_local_port_t
port
);
__po_hi_
port_id
_t
__po_hi_gqueue_used_size
(
__po_hi_task_id
id
,
__po_hi_local_port_t
port
);
__po_hi_
int8
_t
po_hi_gqueues_queue_is_empty
(
__po_hi_task_id
id
);
__po_hi_
port_id
_t
po_hi_gqueues_queue_is_empty
(
__po_hi_task_id
id
);
__po_hi_request_t
*
__po_hi_gqueues_get_request
(
__po_hi_task_id
id
,
__po_hi_local_port_t
port
);
...
...
include/po_hi_types.h
View file @
47796aa2
...
...
@@ -5,7 +5,7 @@
*
* For more informations, please visit http://taste.tuxfamily.org/wiki
*
* Copyright (C) 2007-2009 Telecom ParisTech, 2010-201
4
ESA & ISAE.
* Copyright (C) 2007-2009 Telecom ParisTech, 2010-201
7
ESA & ISAE.
*/
#ifndef __PO_HI_TYPES_H_
...
...
@@ -85,6 +85,8 @@ typedef double __po_hi_float64_t;
typedef
unsigned
char
__po_hi_byte_t
;
typedef
__po_hi_int32_t
__po_hi_port_id_t
;
typedef
enum
{
__PO_HI_IN_DATA_INTER_PROCESS
=
0
,
...
...
src/po_hi_gqueue.c
View file @
47796aa2
...
...
@@ -47,25 +47,25 @@
/* give a default value to the out port */
__po_hi_port_t
*
__po_hi_gqueues
[
__PO_HI_NB_TASKS
];
__po_hi_
int8_t
__po_hi_gqueues_nb_ports
[
__PO_HI_NB_TASKS
];
__po_hi_
int8_t
*
__po_hi_gqueues_sizes
[
__PO_HI_NB_TASKS
];
__po_hi_
uint8_t
*
__po_hi_gqueues_used_size
[
__PO_HI_NB_TASKS
];
__po_hi_
uint8_t
*
__po_hi_gqueues_offsets
[
__PO_HI_NB_TASKS
];
__po_hi_
uint8_t
*
__po_hi_gqueues_woffsets
[
__PO_HI_NB_TASKS
];
__po_hi_
uint8_t
*
__po_hi_gqueues_n_destinations
[
__PO_HI_NB_TASKS
];
__po_hi_
port_id_t
__po_hi_gqueues_nb_ports
[
__PO_HI_NB_TASKS
];
__po_hi_
port_id_t
*
__po_hi_gqueues_sizes
[
__PO_HI_NB_TASKS
];
__po_hi_
port_id_t
*
__po_hi_gqueues_used_size
[
__PO_HI_NB_TASKS
];
__po_hi_
port_id_t
*
__po_hi_gqueues_offsets
[
__PO_HI_NB_TASKS
];
__po_hi_
port_id_t
*
__po_hi_gqueues_woffsets
[
__PO_HI_NB_TASKS
];
__po_hi_
port_id_t
*
__po_hi_gqueues_n_destinations
[
__PO_HI_NB_TASKS
];
__po_hi_port_t
**
__po_hi_gqueues_destinations
[
__PO_HI_NB_TASKS
];
__po_hi_uint
16
_t
__po_hi_gqueues_total_fifo_size
[
__PO_HI_NB_TASKS
];
__po_hi_uint
32
_t
__po_hi_gqueues_total_fifo_size
[
__PO_HI_NB_TASKS
];
__po_hi_request_t
*
__po_hi_gqueues_most_recent_values
[
__PO_HI_NB_TASKS
];
__po_hi_
uint8_t
*
__po_hi_gqueues_first
[
__PO_HI_NB_TASKS
];
__po_hi_
port_id_t
*
__po_hi_gqueues_first
[
__PO_HI_NB_TASKS
];
__po_hi_
uint8_t
__po_hi_gqueues_global_size
[
__PO_HI_NB_TASKS
];
__po_hi_
port_id_t
__po_hi_gqueues_global_size
[
__PO_HI_NB_TASKS
];
__po_hi_local_port_t
*
__po_hi_gqueues_global_history
[
__PO_HI_NB_TASKS
];
__po_hi_uint
16_t
__po_hi_gqueues_global_history_offset
[
__PO_HI_NB_TASKS
];
__po_hi_uint
16_t
__po_hi_gqueues_global_history_woffset
[
__PO_HI_NB_TASKS
];
__po_hi_uint
32_t
__po_hi_gqueues_global_history_offset
[
__PO_HI_NB_TASKS
];
__po_hi_uint
32_t
__po_hi_gqueues_global_history_woffset
[
__PO_HI_NB_TASKS
];
__po_hi_
uint8
_t
*
__po_hi_gqueues_port_is_empty
[
__PO_HI_NB_TASKS
];
__po_hi_
uint8
_t
__po_hi_gqueues_queue_is_empty
[
__PO_HI_NB_TASKS
];
__po_hi_
uint8
_t
__po_hi_gqueues_n_empty
[
__PO_HI_NB_TASKS
];
__po_hi_
port_id
_t
*
__po_hi_gqueues_port_is_empty
[
__PO_HI_NB_TASKS
];
__po_hi_
port_id
_t
__po_hi_gqueues_queue_is_empty
[
__PO_HI_NB_TASKS
];
__po_hi_
port_id
_t
__po_hi_gqueues_n_empty
[
__PO_HI_NB_TASKS
];
#if defined (RTEMS_POSIX) || defined (POSIX) || defined (XENO_POSIX)
pthread_mutex_t
__po_hi_gqueues_mutexes
[
__PO_HI_NB_TASKS
];
...
...
@@ -84,22 +84,22 @@ CRITICAL_SECTION __po_hi_gqueues_cs[__PO_HI_NB_TASKS];
#endif
void
__po_hi_gqueue_init
(
__po_hi_task_id
id
,
__po_hi_
uint8_t
nb_ports
,
__po_hi_
port_id_t
nb_ports
,
__po_hi_port_t
queue
[],
__po_hi_
int8_t
sizes
[],
__po_hi_
uint8_t
first
[],
__po_hi_
uint8_t
offsets
[],
__po_hi_
uint8_t
woffsets
[],
__po_hi_
uint8_t
n_dest
[],
__po_hi_
port_id_t
sizes
[],
__po_hi_
port_id_t
first
[],
__po_hi_
port_id_t
offsets
[],
__po_hi_
port_id_t
woffsets
[],
__po_hi_
port_id_t
n_dest
[],
__po_hi_port_t
*
destinations
[],
__po_hi_
uint8_t
used_size
[],
__po_hi_
port_id_t
used_size
[],
__po_hi_local_port_t
history
[],
__po_hi_request_t
recent
[],
__po_hi_
uint8_t
empties
[],
__po_hi_uint
16
_t
total_fifo_size
)
__po_hi_
port_id_t
empties
[],
__po_hi_uint
32
_t
total_fifo_size
)
{
__po_hi_
uint8
_t
tmp
;
__po_hi_uint
16_t
off
;
__po_hi_
port_id
_t
tmp
;
__po_hi_uint
32_t
off
;
/* XXX May overflow for large value .. */
int
err
;
#if defined (RTEMS_PURE)
...
...
@@ -246,7 +246,7 @@ void __po_hi_gqueue_store_out (__po_hi_task_id id,
__PO_HI_DEBUG_DEBUG
(
"__po_hi_gqueue_store_out() from task %d on port %d
\n
"
,
id
,
port
);
}
__po_hi_
uint8
_t
__po_hi_gqueue_store_in
(
__po_hi_task_id
id
,
__po_hi_
port_id
_t
__po_hi_gqueue_store_in
(
__po_hi_task_id
id
,
__po_hi_local_port_t
port
,
__po_hi_request_t
*
request
)
{
...
...
@@ -645,19 +645,19 @@ __po_hi_port_t __po_hi_gqueue_get_destination (const __po_hi_task_id task_id, co
return
(
__po_hi_gqueues_destinations
[
task_id
][
local_port
][
destination_number
]);
}
__po_hi_
int8
_t
__po_hi_gqueue_get_port_size
(
__po_hi_task_id
id
,
__po_hi_local_port_t
port
)
__po_hi_
port_id
_t
__po_hi_gqueue_get_port_size
(
__po_hi_task_id
id
,
__po_hi_local_port_t
port
)
{
return
__po_hi_gqueues_sizes
[
id
][
port
];
}
__po_hi_
int8
_t
__po_hi_gqueue_used_size
(
__po_hi_task_id
id
,
__po_hi_local_port_t
port
)
__po_hi_
port_id
_t
__po_hi_gqueue_used_size
(
__po_hi_task_id
id
,
__po_hi_local_port_t
port
)
{
return
__po_hi_gqueues_used_size
[
id
][
port
];
}
__po_hi_
int8
_t
po_hi_gqueues_queue_is_empty
(
__po_hi_task_id
id
)
__po_hi_
port_id
_t
po_hi_gqueues_queue_is_empty
(
__po_hi_task_id
id
)
{
return
__po_hi_gqueues_queue_is_empty
[
id
];
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment