]> rtime.felk.cvut.cz Git - frescor/forb.git/log
frescor/forb.git
13 years agoforb: Add tests for forbrun command line parameters
Michal Sojka [Fri, 18 Feb 2011 21:40:50 +0000 (22:40 +0100)]
forb: Add tests for forbrun command line parameters

13 years agoforb: Update forbrun usage help
Michal Sojka [Fri, 18 Feb 2011 21:19:23 +0000 (22:19 +0100)]
forb: Update forbrun usage help

13 years agoforb: fixed passing parameters to shared libraries in forbrun
Petr Benes [Thu, 17 Feb 2011 15:59:16 +0000 (16:59 +0100)]
forb: fixed passing parameters to shared libraries in forbrun

13 years agoforbrun: Exit whenever the first forb_main() returns
Michal Sojka [Thu, 17 Feb 2011 14:32:30 +0000 (15:32 +0100)]
forbrun: Exit whenever the first forb_main() returns

The exit code of forbrun is the returned value of forb_main().

13 years agoforb: Use new syntax for forbrun command line
Michal Sojka [Thu, 17 Feb 2011 14:29:37 +0000 (15:29 +0100)]
forb: Use new syntax for forbrun command line

We have added '--' before the name of the first library as it simplifies
command line parsing.

13 years agoforb: Add tests for forbrun
Michal Sojka [Thu, 17 Feb 2011 13:55:50 +0000 (14:55 +0100)]
forb: Add tests for forbrun

13 years agoforb: Move shared library tests under forbrun/ directory
Michal Sojka [Thu, 17 Feb 2011 11:18:57 +0000 (12:18 +0100)]
forb: Move shared library tests under forbrun/ directory

13 years agoforb: First implementation of forbrun
Michal Sojka [Tue, 15 Feb 2011 16:12:15 +0000 (17:12 +0100)]
forb: First implementation of forbrun

Not tested! forbrun should executed FORB servers implemented as shared
libraries. Its aim is to allow execution of multiple independent servers
in a single process. This is done in preparation of porting FRSH/FORB to
RTEMS (and other single-address space executives).

13 years agoforb: Add support for synchronized initialization of multiple servers
Michal Sojka [Tue, 15 Feb 2011 15:24:32 +0000 (16:24 +0100)]
forb: Add support for synchronized initialization of multiple servers

This is needed in forbrun (future commit) to start multiple servers in a
single address space.

13 years agoforb: Add comments to forb_daemon_prepare()
Michal Sojka [Tue, 15 Feb 2011 15:23:06 +0000 (16:23 +0100)]
forb: Add comments to forb_daemon_prepare()

13 years agoforb: Added shared library for testing of forbrun-based server execution
Michal Sojka [Tue, 15 Feb 2011 13:40:05 +0000 (14:40 +0100)]
forb: Added shared library for testing of forbrun-based server execution

13 years agoforb: object serialization working even for inter-executor invocation
Petr Benes [Tue, 15 Feb 2011 12:24:14 +0000 (13:24 +0100)]
forb: object serialization working even for inter-executor invocation

in case the object being deserialized indicates being local,
it is not being created from scratch, however just copied

13 years agoforb: End of header index removed from stub.
Petr Benes [Fri, 11 Feb 2011 15:22:43 +0000 (16:22 +0100)]
forb: End of header index removed from stub.

It is now embedded into the request structure. Does not make
so much mess in stubs.

13 years agoforb: Objects must be properly reference-counted
Michal Sojka [Fri, 11 Feb 2011 15:07:40 +0000 (16:07 +0100)]
forb: Objects must be properly reference-counted

This fixes some nasty segfaults.

13 years agoInter-executor invocation bugs fixed.
Petr Benes [Fri, 11 Feb 2011 14:35:55 +0000 (15:35 +0100)]
Inter-executor invocation bugs fixed.

Double free bug on request codec buffer fixed.
Stub index indicating a codec read position for inter-executor invocation fixed.

Test application->executor->executor does not fire properly. Needs a bug fix.

13 years agoStruct request adjusted for inter-executor invocation.
Petr Benes [Thu, 10 Feb 2011 14:27:26 +0000 (15:27 +0100)]
Struct request adjusted for inter-executor invocation.

Bug fix required.

13 years agoMerge branch 'master' of rtime.felk.cvut.cz:/frescor/frsh-forb
Petr Benes [Tue, 8 Feb 2011 17:05:38 +0000 (18:05 +0100)]
Merge branch 'master' of rtime.felk.cvut.cz:/frescor/frsh-forb

13 years agoforb: Add test for various invocation methods
Michal Sojka [Tue, 8 Feb 2011 17:01:37 +0000 (18:01 +0100)]
forb: Add test for various invocation methods

This tests the following:
1) remote invocation (currently broken)
2) local invocation from application to the executor
3) local invocation from an executor to another one
4) direct invocation from an executor to the same one

13 years agoIDL compiler: Invoke methods directly only within the same executor
Michal Sojka [Tue, 8 Feb 2011 16:45:13 +0000 (17:45 +0100)]
IDL compiler: Invoke methods directly only within the same executor

13 years agoSimplify frob_get_current_executor()
Michal Sojka [Tue, 8 Feb 2011 16:40:54 +0000 (17:40 +0100)]
Simplify frob_get_current_executor()

Return the executor as return value and not via a parameter.

13 years agoFixed synchronization for codec buffer.
Petr Benes [Tue, 8 Feb 2011 15:30:23 +0000 (16:30 +0100)]
Fixed synchronization for codec buffer.

13 years agoFixed typography.
Petr Benes [Tue, 8 Feb 2011 14:38:21 +0000 (15:38 +0100)]
Fixed typography.

13 years agoMerge branch 'master' of rtime.felk.cvut.cz:/frescor/frsh-forb
Petr Benes [Tue, 8 Feb 2011 13:53:32 +0000 (14:53 +0100)]
Merge branch 'master' of rtime.felk.cvut.cz:/frescor/frsh-forb

13 years agoPrepared for multiple executors in a single address space
Petr Benes [Tue, 8 Feb 2011 13:52:56 +0000 (14:52 +0100)]
Prepared for multiple executors in a single address space

Object implementation invocation prepared for a use of multiple
executors running in a single address space.

One can call the iop methods in the same way as for the case of
a remote invocation.

13 years agoDocument better forb_init()
Michal Sojka [Mon, 7 Feb 2011 20:49:25 +0000 (21:49 +0100)]
Document better forb_init()

13 years agoUsing plain POSIX instead of FOSA for thread specific data.
Petr Benes [Fri, 28 Jan 2011 17:47:01 +0000 (18:47 +0100)]
Using plain POSIX instead of FOSA for thread specific data.

13 years agoInitialize thread specific data in forb_init()
Michal Sojka [Fri, 28 Jan 2011 16:04:37 +0000 (17:04 +0100)]
Initialize thread specific data in forb_init()

This was done to avoid race conditions which causes errors in code.
Unfortunately this change does not help since FOSA is broken and we will
better use plain POSIX here.

13 years agoPrepared test cases for executors (thread specific data) benesp16
Petr Beneš [Tue, 25 Jan 2011 16:13:36 +0000 (17:13 +0100)]
Prepared test cases for executors (thread specific data)

tests/executor_id.c as a simple test
tests/executor_calls.c as a manually created stub

13 years agoAdded a function forb_object_get_executor() in object.h
Petr Beneš [Tue, 25 Jan 2011 16:10:14 +0000 (17:10 +0100)]
Added a function forb_object_get_executor() in object.h

13 years agoAdded a function forb_get_current_executor()
Petr Beneš [Tue, 25 Jan 2011 16:08:54 +0000 (17:08 +0100)]
Added a function forb_get_current_executor()

13 years agoAdded thread specific data to executor
Petr Beneš [Sun, 17 Oct 2010 23:48:07 +0000 (01:48 +0200)]
Added thread specific data to executor

Edited executor.h and executor.c
Requires a testcase

13 years agoLog time
Michal Sojka [Fri, 25 Jun 2010 22:54:47 +0000 (00:54 +0200)]
Log time

13 years agoAllow specifying loglevels in environment
Michal Sojka [Fri, 25 Jun 2010 22:54:17 +0000 (00:54 +0200)]
Allow specifying loglevels in environment

13 years agoAdd ul_log to executor
Michal Sojka [Fri, 25 Jun 2010 22:51:35 +0000 (00:51 +0200)]
Add ul_log to executor

13 years agoGet compilable output for sequences of a typedeffed type
Michal Sojka [Thu, 24 Jun 2010 22:38:26 +0000 (00:38 +0200)]
Get compilable output for sequences of a typedeffed type

This change is a workaround rather than a real fix. This way be generate
unnecessarily more [de]serialization functions even if they do the same
as the function of the original type.

13 years agotest: Sequence is initilized to zero
Michal Sojka [Wed, 23 Jun 2010 11:16:28 +0000 (13:16 +0200)]
test: Sequence is initilized to zero

13 years agoAdd forb_sequence_ensure_allocated()
Michal Sojka [Tue, 22 Jun 2010 15:30:19 +0000 (17:30 +0200)]
Add forb_sequence_ensure_allocated()

13 years agoUnify parameters of forb_sequence_*()
Michal Sojka [Tue, 22 Jun 2010 11:04:32 +0000 (13:04 +0200)]
Unify parameters of forb_sequence_*()

Now, all macros take the pointer to the sequence.

13 years agoAdd sequence tests
Michal Sojka [Mon, 21 Jun 2010 16:45:04 +0000 (18:45 +0200)]
Add sequence tests

13 years agoAdd more sequence helper macros
Michal Sojka [Mon, 21 Jun 2010 16:44:46 +0000 (18:44 +0200)]
Add more sequence helper macros

13 years agoDocument forb_daemon_ready()
Michal Sojka [Sun, 20 Jun 2010 08:45:14 +0000 (10:45 +0200)]
Document forb_daemon_ready()

13 years agoAdd helper functions for daemonizing servers
Michal Sojka [Fri, 18 Jun 2010 23:37:51 +0000 (01:37 +0200)]
Add helper functions for daemonizing servers

13 years agoRemove no longer valid comment (forb_destroy())
Michal Sojka [Fri, 18 Jun 2010 15:10:18 +0000 (17:10 +0200)]
Remove no longer valid comment (forb_destroy())

13 years agoDo not destroy forb automatically on exit
Michal Sojka [Fri, 18 Jun 2010 14:08:38 +0000 (16:08 +0200)]
Do not destroy forb automatically on exit

I do not know how to deregister the exit handler which is needed if
forb_destroy() is called manually. If the handler is not deregister
we get double free error.

14 years agoDo not export config.h
Michal Sojka [Mon, 19 Apr 2010 07:53:38 +0000 (09:53 +0200)]
Do not export config.h

It collides with other packages and it is not necessary to export it at
all.

14 years agoDebug messages display also the orb-id of disconnected peer
Michal Sojka [Tue, 8 Dec 2009 15:56:41 +0000 (16:56 +0100)]
Debug messages display also the orb-id of disconnected peer

14 years agoDon't print the annoying loglevel in log messages
Michal Sojka [Fri, 27 Nov 2009 10:24:46 +0000 (11:24 +0100)]
Don't print the annoying loglevel in log messages

14 years agoIntroduce new ul_log function which prints also process name
Michal Sojka [Fri, 27 Nov 2009 10:15:07 +0000 (11:15 +0100)]
Introduce new ul_log function which prints also process name

This is useful when debugging FRSH with multiple programs/resources
running.

14 years agoSuppressed unused function warning
Michal Sojka [Sun, 12 Jul 2009 15:01:22 +0000 (17:01 +0200)]
Suppressed unused function warning

14 years agoFixed warnings on printf() on 64 bit systems
Michal Sojka [Sun, 12 Jul 2009 14:44:07 +0000 (16:44 +0200)]
Fixed warnings on printf() on 64 bit systems

14 years agoAdded optional TCP_NODELAY to INET proto
Michal Sojka [Wed, 17 Jun 2009 17:22:17 +0000 (19:22 +0200)]
Added optional TCP_NODELAY to INET proto

This is to have graphs in benchmarks not influenced by Nagle's algorithm
in TCP.

14 years agoLoglevel of proto_inet changed to trash
Michal Sojka [Thu, 28 May 2009 11:34:33 +0000 (13:34 +0200)]
Loglevel of proto_inet changed to trash

14 years agoAdded redistribution of HELLO packets
Michal Sojka [Thu, 28 May 2009 03:29:59 +0000 (05:29 +0200)]
Added redistribution of HELLO packets

In FRSH_FORB, contract broker acts as central node and redistributes
HELLO packets to all connected applications. This way every application
can connect to every other.

14 years agoLength of all messages is set to be multiple of 8
Michal Sojka [Thu, 28 May 2009 02:13:15 +0000 (04:13 +0200)]
Length of all messages is set to be multiple of 8

This is to achieve proper alignment of headers on stream oriented connections.

14 years agoModified forb_init_attr to be C++ compatible
Michal Sojka [Thu, 28 May 2009 01:27:11 +0000 (03:27 +0200)]
Modified forb_init_attr to be C++ compatible

14 years agoAdded handling of FORB_EXTERNAL_IP environment variable
Michal Sojka [Wed, 27 May 2009 22:56:03 +0000 (00:56 +0200)]
Added handling of FORB_EXTERNAL_IP environment variable

This variable specifies the IP address of some local interface, which FORB
announces for contacting by others.

14 years agoInet protocol sends HELLO as the first message after connect()
Michal Sojka [Wed, 27 May 2009 21:34:29 +0000 (23:34 +0200)]
Inet protocol sends HELLO as the first message after connect()

This allows the receiver to know sender's listening address, which is different
from the address of the connect()ed socket. Besides the address, also orb_id is
sent, which makes debugging easier.

It this approach is found successful, this functionality should be moved to
iop.c and protocols should have new connect callback which will be called by iop
if the peer was never contacted.

14 years agoHandle EINTR in epoll
Michal Sojka [Wed, 27 May 2009 20:27:25 +0000 (22:27 +0200)]
Handle EINTR in epoll

14 years agoCorrect handling of closed TCP connections in proto_inet
Michal Sojka [Wed, 27 May 2009 18:33:14 +0000 (20:33 +0200)]
Correct handling of closed TCP connections in proto_inet

In FRSH_FORB this allows restarting resource managers without restart of fcb.
The problem of previous implementation was, that if the socket was closed but
peer structure was not unregistered the disconnected peer structure stored
fd of closed socket and when a new connection was made, the fd was the same
as stored in disconnected peer structure. Therefore the disconnected peer
appeared as alive.

14 years agoDiscovery handling moved to discovery.c
Michal Sojka [Wed, 27 May 2009 18:32:15 +0000 (20:32 +0200)]
Discovery handling moved to discovery.c

This was done to defined better (more higher level) interface to peer
manipulation. The interface is represented by forb_new_peer_discovered(),
forb_peer_disconnected() and forb_peer_find[_timer]().

14 years agoAdded more debugging messages to protocols
Michal Sojka [Wed, 27 May 2009 17:03:12 +0000 (19:03 +0200)]
Added more debugging messages to protocols

14 years agoFix error reporting in protocols
Michal Sojka [Wed, 27 May 2009 17:01:21 +0000 (19:01 +0200)]
Fix error reporting in protocols

Error is reported by returning -1, but size_t is unsigned type. All the
needed prototypes were changed to return signed ssize_t.

14 years agoforb_request_send() moved to iop.c
Michal Sojka [Wed, 27 May 2009 15:32:18 +0000 (17:32 +0200)]
forb_request_send() moved to iop.c

The reason is that we want all inter-orb protocol related messages in the same
log domain.

14 years agoFixed errors in INET proto test
Michal Sojka [Tue, 26 May 2009 17:08:00 +0000 (19:08 +0200)]
Fixed errors in INET proto test

14 years agoYet another debug message
Michal Sojka [Tue, 26 May 2009 16:50:13 +0000 (18:50 +0200)]
Yet another debug message

14 years agoAdded REUSEADDR to TCP socket
Michal Sojka [Tue, 26 May 2009 16:49:37 +0000 (18:49 +0200)]
Added REUSEADDR to TCP socket

14 years agoAdded mutex to protect request send from multiple threads
Michal Sojka [Tue, 26 May 2009 16:26:27 +0000 (18:26 +0200)]
Added mutex to protect request send from multiple threads

On TCP, requests sent from multiple threads could be theoretically
intermixed.

14 years agoAutomatically register FCB peer when INET is default
Michal Sojka [Tue, 26 May 2009 15:03:27 +0000 (17:03 +0200)]
Automatically register FCB peer when INET is default

FCB is always found on a fixed port. If FCB_ADDR environment variable
it not set, it is registered on 127.0.0.1, otherwise it is registered
on address according to the FCB_ADDR.

14 years agoDisable discovery protocol when INET is default
Michal Sojka [Tue, 26 May 2009 15:01:50 +0000 (17:01 +0200)]
Disable discovery protocol when INET is default

14 years agoAllow bidirectional communication over TCP connection
Michal Sojka [Tue, 26 May 2009 15:00:28 +0000 (17:00 +0200)]
Allow bidirectional communication over TCP connection

14 years agoAdded register callback for protocols
Michal Sojka [Tue, 26 May 2009 14:57:14 +0000 (16:57 +0200)]
Added register callback for protocols

14 years agoAdd more debug messages
Michal Sojka [Tue, 26 May 2009 14:56:28 +0000 (16:56 +0200)]
Add more debug messages

14 years agoAutomatic registration of FCB's reference
Michal Sojka [Tue, 26 May 2009 14:54:36 +0000 (16:54 +0200)]
Automatic registration of FCB's reference

This is enabled only if FORB is compiled with FRSH_FORB and
INET protocol is default. We can do this because FCB has now fixed ID.

14 years agoReference registry disabled when INET proto is default
Michal Sojka [Tue, 26 May 2009 14:50:11 +0000 (16:50 +0200)]
Reference registry disabled when INET proto is default

Reference registry was moved to a regref.c. When INET protocol is used,
the regitration to /tmp/forb is disabled. For now we use a hack to handle
registration with INET protocol.

14 years agoFORB can be initialized with a fixed ID
Michal Sojka [Tue, 26 May 2009 13:19:43 +0000 (15:19 +0200)]
FORB can be initialized with a fixed ID

This will be used to bypass discovery protocol and configure FCB location
and ID statically.

14 years agoHandling of discovered peers moved to a separate file
Michal Sojka [Tue, 26 May 2009 13:17:46 +0000 (15:17 +0200)]
Handling of discovered peers moved to a separate file

14 years agoAllow inet protocol to listen on a fixed port
Michal Sojka [Tue, 26 May 2009 12:02:34 +0000 (14:02 +0200)]
Allow inet protocol to listen on a fixed port

The port can be specified in attr parameter of forb_init().

14 years agoDisable discovery protocol when INET is default protocol
Michal Sojka [Tue, 26 May 2009 10:24:47 +0000 (12:24 +0200)]
Disable discovery protocol when INET is default protocol

14 years agoImplement peer discovery based on incoming requests
Michal Sojka [Tue, 26 May 2009 05:43:59 +0000 (07:43 +0200)]
Implement peer discovery based on incoming requests

For INET protocol, our simple discovery protocol is not reliable,
therfore, we discover peers also according to incomming requests. Whenever
INET protocol receives first request on accept()ed socket, it prepares
a forb_peer_t corresponding to the socket. In iop.c this peers is added
FORB server_id and then the peer is treated as discovered.

14 years agoproto_inet: send wraped in loop to handle interrupted syscalls
Michal Sojka [Tue, 26 May 2009 07:23:15 +0000 (09:23 +0200)]
proto_inet: send wraped in loop to handle interrupted syscalls

14 years agoAdded build dependences to log_domains.inc
Michal Sojka [Tue, 26 May 2009 05:14:42 +0000 (07:14 +0200)]
Added build dependences to log_domains.inc

14 years agoFORB prints remote addresses in debug messages
Michal Sojka [Mon, 25 May 2009 20:07:01 +0000 (22:07 +0200)]
FORB prints remote addresses in debug messages

14 years agoThe log domains registration uses generic uLUt provided helper.
Pavel Pisa [Mon, 25 May 2009 17:58:39 +0000 (19:58 +0200)]
The log domains registration uses generic uLUt provided helper.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
14 years agoFixed big memory leaks in request handling
Michal Sojka [Sun, 24 May 2009 22:46:21 +0000 (00:46 +0200)]
Fixed big memory leaks in request handling

14 years agoMake proto_inet usable also as local protocol
Michal Sojka [Sun, 10 May 2009 21:14:55 +0000 (23:14 +0200)]
Make proto_inet usable also as local protocol

Now inet protocol's TCP socket does not listen on a specific port so
that multiple applications on a single node can communicate using this
protocol.

UDP socket listens on a fixed port and since SO_REUSEADDR is enabled,
multiple applications can receive the same content.

14 years agoAdded error checking of deserialization in skeletons
Michal Sojka [Thu, 21 May 2009 11:10:56 +0000 (13:10 +0200)]
Added error checking of deserialization in skeletons

14 years agoFixed deserialization of empty sequences
Michal Sojka [Thu, 21 May 2009 10:21:58 +0000 (12:21 +0200)]
Fixed deserialization of empty sequences

When an empty sequence was deserialized, malloc(0) returned NULL which
was treated as malloc error. Now allocation of sequence buffers is moved
to a separate function which return allocation success.

14 years agoFixed g++ warning about signedness
Michal Sojka [Wed, 20 May 2009 19:54:23 +0000 (21:54 +0200)]
Fixed g++ warning about signedness

14 years agoSuppress all g++ warnings
Michal Sojka [Wed, 20 May 2009 19:33:37 +0000 (21:33 +0200)]
Suppress all g++ warnings

This suppresses both: unused parameter and statement with no effect warnings

15 years agoMore portable allocation of empty sequences
Michal Sojka [Sun, 17 May 2009 19:15:46 +0000 (21:15 +0200)]
More portable allocation of empty sequences

15 years agoInitialize properly _maximum field of sequences on deserialization
Michal Sojka [Sun, 17 May 2009 11:32:42 +0000 (13:32 +0200)]
Initialize properly _maximum field of sequences on deserialization

15 years agoFixed forb_sequence_alloc macro
Michal Sojka [Sun, 17 May 2009 11:02:41 +0000 (13:02 +0200)]
Fixed forb_sequence_alloc macro

15 years agoAdded helper macros for easier work with sequences
Michal Sojka [Tue, 12 May 2009 23:14:10 +0000 (01:14 +0200)]
Added helper macros for easier work with sequences

15 years agoMaximum request size increased to 4 kB
Michal Sojka [Tue, 12 May 2009 22:32:15 +0000 (00:32 +0200)]
Maximum request size increased to 4 kB

When huge contracts with spare capacity was sent, the limit of request
size was exceeded so we need to provide a bigger buffer. Alternative
solution would be dynamically sized CDR buffers.

15 years agoDo not free buffer when deserializing sequences
Michal Sojka [Tue, 12 May 2009 21:57:43 +0000 (23:57 +0200)]
Do not free buffer when deserializing sequences

This commit fixes crashes of FORB applications. The sequence variable
which is being deserialized might be uninitialized and therefore it is
not good idea to free the memory referenced by an uninitialized pointer
(seq->_buffer).

15 years agoAdded callback for peer discovery
Michal Sojka [Mon, 11 May 2009 01:28:32 +0000 (03:28 +0200)]
Added callback for peer discovery

By using this callback, an application can react on peer discovery.
Note: Peers are discovered by broadcasting "HELLO" packets.

15 years agoorb_id is propagated to peers
Michal Sojka [Sun, 10 May 2009 22:45:11 +0000 (00:45 +0200)]
orb_id is propagated to peers

15 years agoFixed NULL string serialization
Michal Sojka [Sun, 10 May 2009 22:20:32 +0000 (00:20 +0200)]
Fixed NULL string serialization

15 years agoforb_init() prototype changed to be extensible
Michal Sojka [Sun, 10 May 2009 21:41:28 +0000 (23:41 +0200)]
forb_init() prototype changed to be extensible

The third parameter to forb_init() is a pointer to a structure
containing attributes to control FORB initialization. Currently, only
orb_id (the original third parameter of forb_init()) is present in the
structure. Future additions to this structure do not break source code
compatibility.

15 years agoproto_unix: Set socket permission rw-rw-rw
Michal Sojka [Sun, 10 May 2009 11:09:55 +0000 (13:09 +0200)]
proto_unix: Set socket permission rw-rw-rw

This allows processes of different users to communicates each with the
other.