#include <forb/iop.h>
#include <forb/cdr.h>
#include <forb/object.h>
+#include <semaphore.h>
#include "myinterface.h"
CORBA_long myinterface_add(myinterface _obj, const CORBA_long a, const CORBA_long b, CORBA_Environment *ev)
{
CORBA_long _forb_retval;
- executor *exec_current;
+ forb_executor_t *exec_current;
if (ev) ev->major = FORB_EX_NONE;
/* local object */
- if (forb_object_is_local(_obj)) {
+ if (forb_object_is_local(_obj) && !forb_get_current_executor(exec_current) &&
+ (forb_object_get_executor(_obj) == exec_current)) {
if (!_obj->interface ||
strncmp(_obj->interface->name, "myinterface", 11) != 0) {
ev->major = FORB_EX_BAD_OPERATION;
return _forb_retval;
}
- if (!forb_get_current_executor(exec_current) && (forb_object_get_executor(_obj) == exec_current))
- /* direct invocation */
- _forb_retval = _myinterface_impl(_obj)->add(_obj, a, b, ev);
- } else {
- /* TODO inter-thread invocation*/
- }
+ /* direct invocation */
+ _forb_retval = _myinterface_impl(_obj)->add(_obj, a, b, ev);
} else {
/* remote object - the same as before */
forb_request_t req;