Return-Path: X-Original-To: apmail-incubator-celix-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-celix-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6F2EA104E0 for ; Thu, 3 Oct 2013 12:07:37 +0000 (UTC) Received: (qmail 55176 invoked by uid 500); 3 Oct 2013 12:07:36 -0000 Delivered-To: apmail-incubator-celix-dev-archive@incubator.apache.org Received: (qmail 55151 invoked by uid 500); 3 Oct 2013 12:07:35 -0000 Mailing-List: contact celix-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: celix-dev@incubator.apache.org Delivered-To: mailing list celix-dev@incubator.apache.org Received: (qmail 55143 invoked by uid 99); 3 Oct 2013 12:07:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Oct 2013 12:07:35 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [85.13.132.30] (HELO dd7632.kasserver.com) (85.13.132.30) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Oct 2013 12:07:29 +0000 Received: from webmail.sundevil.de (dd7632.kasserver.com [85.13.132.30]) by dd7632.kasserver.com (Postfix) with ESMTPA id 321BE158071B for ; Thu, 3 Oct 2013 14:07:08 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Thu, 03 Oct 2013 14:07:08 +0200 From: =?UTF-8?Q?Bj=C3=B6rn_Petri?= To: Subject: Re: Remote service using shared mem In-Reply-To: References: <5213C63A.1050002@gmail.com> <52150460.7070606@gmail.com> <52356979.1040002@sundevil.de> <03fa0772516eaaab4c1fcf59f52f00e9@imap.sundevil.de> <5238198D.8050209@sundevil.de> <4f9dbca6c64a7583e34c4be4cab8eadc@imap.sundevil.de> <52454D60.9030906@sundevil.de> Message-ID: <617379229e8f0bcdc85d3ed8fe429f1d@imap.sundevil.de> X-Sender: bjoern.petri@sundevil.de User-Agent: Roundcube Webmail/RCMAIL_VERSION X-Virus-Checked: Checked by ClamAV on apache.org Hi Alexander, introducing the lock in the discovery_stop function was done with purpose. The unlocking and locking should enable all discovery-polling-threads to update their local list of services and in the case of the stopping discovery bundle it should allow the thread to leave it's loop (the loop control variable should be set to false before performing the unlock and lock). So, it should actually not wait on the join - I'll take a look at the code and check what is going on there. Regards, Björn Am 2013-10-03 11:59, schrieb Alexander Broekhuis: > Hi Bjoern, > > I have some problems with the discovery now. If I try to stop the > discovery > bundle, it tries to join the discovery thread, but somehow the lock > isn't > released and the thread doesn't exit. > > Looking in the code, the discovery_stop now has an unlock directly > followed > by a lock. This seems to be the problem. Did a small error sneak in? > Or is > there some reason for the unlock/lock? > > I'll do some more testing later on this week, so I'll get back to you > :) > > > 2013/10/2 Björn Petri > >> >> Alexander, >> >> I updated the rs shared memory implementation to >> >> (1) use System-V shared memory routines instead of ones from APR, >> (2) make use of your install_bundles macro, >> (3) perform some necessary cleanup when the exported service is >> stopped >> (This is also missing in the "standard"-rsa implementation). See >> remoteServiceAdmin_**removeExportedService function for details, >> (4) get rid of the linking of the example_proxy against the rsa_shm, >> (5) and fixed some minor bugs. >> >> looking forward to your feedback, >> Bjoern >> >> >> >> >> >> >> >> >> >> Am 2013-09-27 16:11, schrieb Alexander Broekhuis: >> >> 2013/9/27 Björn Petri >>> >>> On 09/18/2013 06:29 PM, Alexander Broekhuis wrote: >>>> >>>> I checked it, and there are some small leftovers in the code. The >>>> proxy >>>>> still includes the rsa and also links with the library. >>>>> >>>>> >>>> How do you want to get rid of this dependency? The proxy needs to >>>> include >>>> definition of the remote_proxy_service as well as the rsa does. Do >>>> I miss >>>> something? >>>> >>>> >>> Since the proxy now uses the function pointer and only the service >>> struct >>> of the RSA it only needs the header files (as far as I can tell). >>> Also, >>> with the concept of bundles, and Celix not supporting code-sharing >>> at this >>> point, bundles (actually the library in it) should never link to a >>> library >>> of any other bundle. >>> Libraries are loaded locally, so the symbols aren't shared with >>> others. So >>> this means that if you link with another bundle, at runtime there >>> will be >>> unresolved references. Hence the need for services (structs with >>> function >>> pointers) etc. >>> >> >>