]> rtime.felk.cvut.cz Git - frescor/forb.git/log
frescor/forb.git
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

14 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

14 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

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

14 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

14 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.

14 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).

14 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.

14 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

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

14 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.

14 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.

15 years agoAdded discovery debug message
Michal Sojka [Thu, 23 Apr 2009 05:18:44 +0000 (07:18 +0200)]
Added discovery debug message

15 years agoAvoid redefinition of _BSD_SOURCE
Michal Sojka [Thu, 23 Apr 2009 05:16:18 +0000 (07:16 +0200)]
Avoid redefinition of _BSD_SOURCE

15 years agoFixed some problems with big-endian architecture
Michal Sojka [Thu, 23 Apr 2009 05:15:33 +0000 (07:15 +0200)]
Fixed some problems with big-endian architecture

Although this patch fixes the most important problems, there are still
some incompatibilities when big-endian machines communicate with
little-endian ones. Big to big communication works correctly.

15 years agoModified to achieve C++ compatibility
Michal Sojka [Tue, 10 Feb 2009 14:12:04 +0000 (15:12 +0100)]
Modified to achieve C++ compatibility

15 years agoFixed typos
Michal Sojka [Tue, 20 Jan 2009 21:45:06 +0000 (22:45 +0100)]
Fixed typos

15 years agoFixed a memory leak in request processing
Michal Sojka [Thu, 29 Jan 2009 10:02:58 +0000 (11:02 +0100)]
Fixed a memory leak in request processing

15 years agoEpoll event structure zeroed before use
Michal Sojka [Thu, 29 Jan 2009 09:44:18 +0000 (10:44 +0100)]
Epoll event structure zeroed before use

15 years agoRemoved duplicite include
Michal Sojka [Tue, 20 Jan 2009 16:45:00 +0000 (17:45 +0100)]
Removed duplicite include

15 years agoPeer discovery code refactored
Michal Sojka [Tue, 20 Jan 2009 14:07:55 +0000 (15:07 +0100)]
Peer discovery code refactored

15 years agoFixed handling of addresses in HELLO packets
Michal Sojka [Tue, 20 Jan 2009 13:12:12 +0000 (14:12 +0100)]
Fixed handling of addresses in HELLO packets

15 years agoFixed a bug in discovery test
Michal Sojka [Tue, 20 Jan 2009 11:11:50 +0000 (12:11 +0100)]
Fixed a bug in discovery test

15 years agoAdded INET protocol
Michal Sojka [Fri, 16 Jan 2009 10:18:21 +0000 (11:18 +0100)]
Added INET protocol

This protocol uses TCP and UDP sockets to communicate.

15 years agoImproved reference counting of peer structures
Michal Sojka [Tue, 20 Jan 2009 10:33:03 +0000 (11:33 +0100)]
Improved reference counting of peer structures

15 years agopeer_destroy should return void
Michal Sojka [Mon, 19 Jan 2009 11:32:25 +0000 (12:32 +0100)]
peer_destroy should return void

15 years agoAdded error handling to receive thread
Michal Sojka [Mon, 19 Jan 2009 09:29:16 +0000 (10:29 +0100)]
Added error handling to receive thread

15 years agoPort is registered using a port reference instead of forb pointer
Michal Sojka [Mon, 12 Jan 2009 14:18:37 +0000 (15:18 +0100)]
Port is registered using a port reference instead of forb pointer

15 years agoExport port.h for applications
Michal Sojka [Mon, 12 Jan 2009 14:08:48 +0000 (15:08 +0100)]
Export port.h for applications

15 years agoAdded error handling to unix proto initialization
Michal Sojka [Mon, 12 Jan 2009 13:59:22 +0000 (14:59 +0100)]
Added error handling to unix proto initialization

15 years agoPort structure combines some fields in desc structure
Michal Sojka [Mon, 12 Jan 2009 13:00:34 +0000 (14:00 +0100)]
Port structure combines some fields in desc structure

This is to simplify initialization and registration of the port.
Initialization fills desc field and registration the rest.

15 years agoCorrected peer reference counting
Michal Sojka [Wed, 7 Jan 2009 16:59:45 +0000 (17:59 +0100)]
Corrected peer reference counting

15 years agoUpdated to addition of const qualifier to GAVL keys in ULUT library
Michal Sojka [Wed, 7 Jan 2009 15:22:11 +0000 (16:22 +0100)]
Updated to addition of const qualifier to GAVL keys in ULUT library

15 years agoUpdated Makefile.rules
Michal Sojka [Wed, 7 Jan 2009 15:17:04 +0000 (16:17 +0100)]
Updated Makefile.rules

15 years agoCDR_* functions and types renamed to FORB_CDR_*
Michal Sojka [Wed, 26 Nov 2008 13:22:57 +0000 (14:22 +0100)]
CDR_* functions and types renamed to FORB_CDR_*

This is to avoid namespace collision when linking with ORTE.

15 years agoAdded better documentation of executor
Michal Sojka [Sat, 15 Nov 2008 17:17:46 +0000 (18:17 +0100)]
Added better documentation of executor

15 years agoRemoved dependency on GTK
Michal Sojka [Sat, 15 Nov 2008 09:16:45 +0000 (10:16 +0100)]
Removed dependency on GTK

15 years agoforb_exception_occured renamed to forb_exception_occurred
Michal Sojka [Tue, 11 Nov 2008 09:37:57 +0000 (10:37 +0100)]
forb_exception_occured renamed to forb_exception_occurred

15 years agoFixed forb_get_orb_of()
Michal Sojka [Tue, 11 Nov 2008 09:37:21 +0000 (10:37 +0100)]
Fixed forb_get_orb_of()