From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27569 invoked by alias); 8 Aug 2013 13:14:42 -0000 Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org Received: (qmail 27535 invoked by uid 89); 8 Aug 2013 13:14:41 -0000 X-Spam-SWARE-Status: No, score=4.6 required=5.0 tests=AWL,BAYES_60,FREEMAIL_FROM,RCVD_IN_HOSTKARMA_YE,RDNS_NONE autolearn=no version=3.3.1 Received: from Unknown (HELO sam.nabble.com) (216.139.236.26) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 08 Aug 2013 13:14:41 +0000 Received: from tom.nabble.com ([192.168.236.105]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1V7Q2z-00042D-Mf for ecos-devel@ecos.sourceware.org; Thu, 08 Aug 2013 06:14:33 -0700 Date: Thu, 08 Aug 2013 13:14:00 -0000 From: =?UTF-8?Q?Max_Seidenst=C3=BCcker?= To: ecos-devel@ecos.sourceware.org Message-ID: <1375967673684-240552.post@n7.nabble.com> Subject: How to emulate workqueue mechanism in eCos? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2013-08/txt/msg00001.txt.bz2 Hi folks, I am still working on updating JFFS2 with the write buffer support to eCos. Currently I am struggeling with workqueues. I tried to circumvent those by directly triggering the wbuf_flush() operation, but with all those semaphores I get deadlocks all the time. So to be cleaner I'd like to replicate the workqueue mechanism in eCos. How can this be achieved? My idea is to use a whole thread for that. It may be an overkill on ressources but I think I can make it work. How would you implement synchronization, function calls? The workqueue thread ask if new scheduled work exists, if not -> sleep for some time, after that do this process again Any suggestions or ideas are appreciated! -- View this message in context: http://sourceware-org.1504.n7.nabble.com/How-to-emulate-workqueue-mechanism-in-eCos-tp240552.html Sent from the Sourceware - ecos-devel mailing list archive at Nabble.com.