mirror of
https://github.com/adtools/clib2.git
synced 2026-09-19 07:04:03 +00:00
- The program's task priority is now always restored before it exits.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14772 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# $Id: GNUmakefile.68k,v 1.15 2004-11-14 11:06:27 obarthel Exp $
|
# $Id: GNUmakefile.68k,v 1.16 2004-11-14 11:43:30 obarthel Exp $
|
||||||
#
|
#
|
||||||
# :ts=8
|
# :ts=8
|
||||||
#
|
#
|
||||||
@@ -106,7 +106,7 @@ INCLUDES = -Iinclude -I. -Inetinclude
|
|||||||
OPTIONS = -DNDEBUG -fno-builtin -DNO_INLINE_STDARG
|
OPTIONS = -DNDEBUG -fno-builtin -DNO_INLINE_STDARG
|
||||||
#OPTIONS = -D__MEM_DEBUG -fno-builtin
|
#OPTIONS = -D__MEM_DEBUG -fno-builtin
|
||||||
#OPTIONS = -DDEBUG -D__MEM_DEBUG -DNO_INLINE_STDARG -fno-builtin
|
#OPTIONS = -DDEBUG -D__MEM_DEBUG -DNO_INLINE_STDARG -fno-builtin
|
||||||
OPTIMIZE = -O
|
OPTIMIZE = -O -fomit-frame-pointer -fstrength-reduce -finline-functions
|
||||||
#OPTIMIZE = -O2 -fomit-frame-pointer
|
#OPTIMIZE = -O2 -fomit-frame-pointer
|
||||||
#DEBUG = -g2
|
#DEBUG = -g2
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: stdlib_main.c,v 1.6 2004-11-14 11:06:27 obarthel Exp $
|
* $Id: stdlib_main.c,v 1.7 2004-11-14 11:43:30 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -413,11 +413,11 @@ _main(void)
|
|||||||
running in the shell or was launched from Workbench. */
|
running in the shell or was launched from Workbench. */
|
||||||
if(DO_NOT __detach)
|
if(DO_NOT __detach)
|
||||||
{
|
{
|
||||||
int old_priority = 256;
|
int old_priority = this_process->pr_Task.tc_Node.ln_Pri;
|
||||||
|
|
||||||
/* Change the task priority, if requested. */
|
/* Change the task priority, if requested. */
|
||||||
if(-128 <= __priority && __priority <= 127)
|
if(-128 <= __priority && __priority <= 127)
|
||||||
old_priority = SetTaskPri((struct Task *)this_process,__priority);
|
SetTaskPri((struct Task *)this_process,__priority);
|
||||||
|
|
||||||
/* Was a minimum stack size requested and do we
|
/* Was a minimum stack size requested and do we
|
||||||
need more stack space than was provided for? */
|
need more stack space than was provided for? */
|
||||||
@@ -463,9 +463,8 @@ _main(void)
|
|||||||
return_code = call_main();
|
return_code = call_main();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Restore the task priority, if necessary. */
|
/* Restore the task priority. */
|
||||||
if(-128 <= old_priority && old_priority <= 127)
|
SetTaskPri((struct Task *)this_process,old_priority);
|
||||||
SetTaskPri((struct Task *)this_process,old_priority);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -496,9 +495,9 @@ _main(void)
|
|||||||
tags[i]. ti_Tag = NP_StackSize;
|
tags[i]. ti_Tag = NP_StackSize;
|
||||||
tags[i++]. ti_Data = stack_size;
|
tags[i++]. ti_Data = stack_size;
|
||||||
tags[i]. ti_Tag = NP_Name;
|
tags[i]. ti_Tag = NP_Name;
|
||||||
tags[i++]. ti_Data = (ULONG)(__process_name != NULL ? __process_name : program_name);
|
tags[i++]. ti_Data = (ULONG)(__process_name != NULL ? (UBYTE *)__process_name : FilePart(program_name));
|
||||||
tags[i]. ti_Tag = NP_CommandName;
|
tags[i]. ti_Tag = NP_CommandName;
|
||||||
tags[i++]. ti_Data = (ULONG)program_name;
|
tags[i++]. ti_Data = (ULONG)FilePart(program_name);
|
||||||
tags[i]. ti_Tag = NP_Cli;
|
tags[i]. ti_Tag = NP_Cli;
|
||||||
tags[i++]. ti_Data = TRUE;
|
tags[i++]. ti_Data = TRUE;
|
||||||
tags[i]. ti_Tag = NP_Arguments;
|
tags[i]. ti_Tag = NP_Arguments;
|
||||||
|
|||||||
Reference in New Issue
Block a user