[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/1] Add module_semaphore_free() to destroy semaphore...
From: |
Andrei Kholodnyi |
Subject: |
[PATCH 1/1] Add module_semaphore_free() to destroy semaphore... |
Date: |
Wed, 7 Dec 2011 23:48:54 +0100 |
2011/12/7 Trevor Saunders <trev.saunders at gmail.com>
> On Wed, Dec 07, 2011 at 07:35:56PM +0400, sub wrote:
> > Add module_semaphore_free() to destroy semaphore, and release allocated
> memory (see module_semaphore_init()).
>
> instead of all this you should just get rid of the dynamic allocation
> in the first place.
you mean just to remove module_semaphore_init completely and use
static sem_t my_sem;
in the modules instead of
static sem_t *my_sem;
> > Add module_semaphore_count_get() to get a value of the semaphores
> counter.
>
> 1 that's not what it does (and if it did it would be useless and wrong),
> 2 what it does while not broken is at best only slightly useful.
>
+1, counting makes not much sense here.
> > --- a/src/modules/module_utils.c
> > +++ b/src/modules/module_utils.c
> > @@ -57,7 +58,7 @@ do_message(SPDMessageType msgtype)
> > cur_line = NULL;
> > n = 0;
> > ret = spd_getline(&cur_line, &n, stdin);
> > - nlines++;
> > + ++nlines;
>
> 1, not related 2, bad
>
+1, not related to the patch
Andrei.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.freebsoft.org/pipermail/speechd/attachments/20111207/bc44d61a/attachment.html>
- [PATCH 1/1] Add module_semaphore_free() to destroy semaphore..., sub, 2011/12/07
- [PATCH 1/1] Add module_semaphore_free() to destroy semaphore..., Trevor Saunders, 2011/12/07
- [PATCH 1/1] Add module_semaphore_free() to destroy semaphore...,
Andrei Kholodnyi <=
- [PATCH 1/1] Add module_semaphore_free() to destroy semaphore..., Trevor Saunders, 2011/12/07
- [PATCH 1/1] Add module_semaphore_free() to destroy semaphore..., Andrei Kholodnyi, 2011/12/08
- [PATCH 1/1] Add module_semaphore_free() to destroy semaphore..., sub, 2011/12/08
- [PATCH 1/1] Add module_semaphore_free() to destroy semaphore..., Trevor Saunders, 2011/12/08
- [PATCH 1/1] Add module_semaphore_free() to destroy semaphore..., sub, 2011/12/09
- [PATCH 1/1] Add module_semaphore_free() to destroy semaphore..., Trevor Saunders, 2011/12/09