public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] cyg_semaphore_destroy, cyg_mutex_destroy, etc...
@ 2000-08-17 20:31 Fabrice Gautier
  2000-08-18  4:00 ` Nick Garnett
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Gautier @ 2000-08-17 20:31 UTC (permalink / raw)
  To: Ecos-List (E-mail)

Hi,

Since the memory for semaphore or mutexes must be allocated before the call
to the *_create functions, I'm wondering what the *_destroy functions
actually do?

I have the same question for other structures like Counters, Clokcs etc...

In the documentation it is said about cyg_counter_delete and
cyg_clock_delete that they free the memory used by the structure. ABout
cyg_alarm_delete it is ais that it frees the meory IF it was dinamycally
allocated. Since there is not yet support for the dynamic allocation in the
creates functions, I think that the "free  memory" feature is not already
implemented, right?

Thanks

A+
-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] cyg_semaphore_destroy, cyg_mutex_destroy, etc...
  2000-08-17 20:31 [ECOS] cyg_semaphore_destroy, cyg_mutex_destroy, etc Fabrice Gautier
@ 2000-08-18  4:00 ` Nick Garnett
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Garnett @ 2000-08-18  4:00 UTC (permalink / raw)
  To: ecos-discuss

Fabrice Gautier <Fabrice_Gautier@sdesigns.com> writes:

> Hi,
> 
> Since the memory for semaphore or mutexes must be allocated before the call
> to the *_create functions, I'm wondering what the *_destroy functions
> actually do?

At present nothing. However if we ever have a machanism where these
structures get registered with the kernel in some way, the destroy
functions would deregister them. 

> 
> I have the same question for other structures like Counters, Clokcs etc...
> 
> In the documentation it is said about cyg_counter_delete and
> cyg_clock_delete that they free the memory used by the structure. ABout
> cyg_alarm_delete it is ais that it frees the meory IF it was dinamycally
> allocated. Since there is not yet support for the dynamic allocation in the
> creates functions, I think that the "free  memory" feature is not already
> implemented, right?
> 

A lot of the documentation was written so that when/if we ever
implement the dynamic memory allocation in the KAPI, it would not have
to be changed. This means that it often talks about freeing memory
when in fact it does not such thing.

Since none of this has yet been done, you are correct in assuming that
the "free memory" feature is not yet implemented. At present all of
the KAPI interfaces expect the caller to supply all the memory needed
for the objects they control.

-- 
Nick Garnett, eCos Kernel Architect
Red Hat, Cambridge, UK

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-08-18  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-17 20:31 [ECOS] cyg_semaphore_destroy, cyg_mutex_destroy, etc Fabrice Gautier
2000-08-18  4:00 ` Nick Garnett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).