version 1.63, 2003/12/11 16:20:46
|
version 1.64, 2004/06/03 15:04:54
|
|
|
// Modified By: Rudy Schuet (rudy.schuet@compaq.com) 11/12/01 | // Modified By: Rudy Schuet (rudy.schuet@compaq.com) 11/12/01 |
// added nsk platform support | // added nsk platform support |
// Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) | // Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) |
|
// Amit K Arora, IBM (amita@in.ibm.com) for PEP#101 |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
{ | { |
if( data != NULL) | if( data != NULL) |
{ | { |
AcceptLanguages * al = static_cast<AcceptLanguages *>(data); |
AutoPtr<AcceptLanguages> al(static_cast<AcceptLanguages *>(data)); |
delete al; |
|
} | } |
} | } |
// l10n end | // l10n end |
|
|
#ifndef PEGASUS_THREAD_CLEANUP_NATIVE | #ifndef PEGASUS_THREAD_CLEANUP_NATIVE |
void Thread::cleanup_push( void (*routine)(void *), void *parm) throw(IPCException) | void Thread::cleanup_push( void (*routine)(void *), void *parm) throw(IPCException) |
{ | { |
cleanup_handler *cu = new cleanup_handler(routine, parm); |
AutoPtr<cleanup_handler> cu(new cleanup_handler(routine, parm)); |
try | try |
{ | { |
_cleanup.insert_first(cu); |
_cleanup.insert_first(cu.get()); |
} | } |
catch(IPCException&) | catch(IPCException&) |
{ | { |
delete cu; |
|
throw; | throw; |
} | } |
|
cu.release(); |
return; | return; |
} | } |
| |
void Thread::cleanup_pop(Boolean execute) throw(IPCException) | void Thread::cleanup_pop(Boolean execute) throw(IPCException) |
{ | { |
cleanup_handler *cu ; |
AutoPtr<cleanup_handler> cu ; |
try | try |
{ | { |
cu = _cleanup.remove_first() ; |
cu.reset(_cleanup.remove_first()); |
} | } |
catch(IPCException&) | catch(IPCException&) |
{ | { |
|
|
} | } |
if(execute == true) | if(execute == true) |
cu->execute(); | cu->execute(); |
delete cu; |
|
} | } |
| |
#endif | #endif |