* cris/traps.c (TARGET_SYS_exit_group): Define.
authorHans-Peter Nilsson <hp@axis.com>
Sat, 3 Jan 2009 20:25:48 +0000 (20:25 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Sat, 3 Jan 2009 20:25:48 +0000 (20:25 +0000)
(cris_break_13_handler): Handle it like the exit for the last
thread.

sim/ChangeLog
sim/cris/traps.c

index 553d3bd5720054c5bac972f6df518972ead3df91..100adb980427a7a7be5109f7d1e412667fb7a200 100644 (file)
@@ -1,5 +1,9 @@
 2009-01-03  Hans-Peter Nilsson  <hp@axis.com>
 
+       * cris/traps.c (TARGET_SYS_exit_group): Define.
+       (cris_break_13_handler): Handle it like the exit for the last
+       thread.
+
        * cris/traps.c (TARGET_UTSNAME): Update to 2009-01-01.
        (TARGET_EPOCH): Update to match TARGET_UTSNAME.  Correct comment.
        (cris_break_13_handler) <case TARGET_SYS_uname>: Update to
index b11cd867fd3fcbdca08b91035498d90bada094a2..081273fac78541215ac18c4d8b9a428dc5d89ab4 100644 (file)
@@ -113,6 +113,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #define TARGET_SYS_getegid32 202
 #define TARGET_SYS_getgid32 200
 #define TARGET_SYS_fcntl64 221
+#define TARGET_SYS_exit_group 252
 
 #define TARGET_PROT_READ       0x1
 #define TARGET_PROT_WRITE      0x2
@@ -1456,7 +1457,8 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
   s.arg2 = arg2;
   s.arg3 = arg3;
 
-  if (callnum == TARGET_SYS_exit && current_cpu->m1threads == 0)
+  if (callnum == TARGET_SYS_exit_group
+      || (callnum == TARGET_SYS_exit && current_cpu->m1threads == 0))
     {
       if (CPU_CRIS_MISC_PROFILE (current_cpu)->flags
          & FLAG_CRIS_MISC_PROFILE_ALL)