From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13029 invoked by alias); 29 Jun 2004 12:12:57 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 13007 invoked from network); 29 Jun 2004 12:12:55 -0000 Received: from unknown (HELO calvin.codito.co.in) (203.199.140.162) by sourceware.org with SMTP; 29 Jun 2004 12:12:55 -0000 Received: from codito.com (sandeep.codito.co.in [192.168.100.37]) by calvin.codito.co.in (8.12.10/8.12.10) with ESMTP id i5TC9j0l014522; Tue, 29 Jun 2004 17:39:46 +0530 Message-ID: <40E15F0A.10109@codito.com> Date: Tue, 29 Jun 2004 12:12:00 -0000 From: sandeep User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 MIME-Version: 1.0 To: Han Hoekstra CC: "'Gorjup Matthias'" , "''Ecos-Discuss (E-Mail)'" References: <200406291221.i5TCLOoF026011@marvin.codito.net> In-Reply-To: <200406291221.i5TCLOoF026011@marvin.codito.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [ECOS] FW: [ECOS] Mailboxes - priorities of messages X-SW-Source: 2004-06/txt/msg00291.txt.bz2 Just my two cents. what about -- * putting your mailboxex as an array of mailbox and assign and manage priorities in similar ways as in case of process scheduling * or keep single mailbox, and add priority to message, while inseting the message, make sure that things remain sorted based on priority of messages. > > I have had the same problem in one of my projects and what I did is trigger > the receive process using a semaphore and have it check multiple mailboxes, > the one with the highest priority first and the one with the lowest priority > last. Also I made my own mailbox implementation which uses the eCos Mailbox > API to implement the actual message queue, the only thing my mailbox does > extra is trigger the semaphore every time a message is placed in the queue, > so that the receive process will start. The sending process only has to > place the message in the correct mailbox, which corresponds to the priority > of the message..... > > Greetings, > Han > -----Original Message----- > From: ecos-discuss-owner@ecos.sourceware.org > [mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Gorjup Matthias > Sent: dinsdag 29 juni 2004 12:48 > To: ''Ecos-Discuss (E-Mail)' > Subject: [ECOS] FW: [ECOS] Mailboxes - priorities of messages > > Hello Andrew, > > Here are some details of our mBox problem; > > When more than one thread (task) is using the same mBox to communicate with > one another thread, the send/received mails(messages) has to be kept in a > message qeue. ( or they arrive to mBox and kept in an order qeue). > > In this message qeue, we need to put the process of the messages (mails) in > a prioritisation. For example , a critical mail send by a timeout function > has to be processed before a user request mail which is send through the > same mBox to the same thread. > > I hope this gives you enough info. > > Regards. > Tolga > > > > -----Original Message----- > From: Gorjup Matthias > To: 'Tolga SIMSEK' (E-Mail) > Sent: 29.06.2004 12:34 > Subject: WG: [ECOS] Mailboxes - priorities of messages > > > > -----Ursprungliche Nachricht----- > Von: Andrew Lunn [ mailto:andrew@lunn.ch ] > Gesendet: Dienstag, 29. Juni 2004 11:29 > An: Gorjup Matthias > Cc: 'ecos-discuss@ecos.sourceware.org' > Betreff: Re: [ECOS] Mailboxes - priorities of messages > > > On Tue, Jun 29, 2004 at 10:02:32AM +0200, Gorjup Matthias wrote: > >>Hello, >> >>we are porting a special ethernet driver to eCos and we would need to >>implement prioritozed mailbox messages for communication between > > threads. Is > >>it possible to use priorities for mbox messages? If not, is there some > > >>workaround or another solution that we could use? > > > Prioritized could mean many different things. Please could you be more > specific. Are you talking about the threads blocking for access to the mbox, > the messages withing the mbox, or some other priority feature. > > Andrew > > -- > Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos > and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss > > > -- regards sandeep -------------------------------------------------------------------------- Gnagloot, n.: A person who leaves all his ski passes on his jacket just to impress people. -- Rich Hall, "Sniglets" -------------------------------------------------------------------------- -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss