Changeset 624 for trunk/user/sort/sort.c


Ignore:
Timestamp:
Mar 12, 2019, 1:37:38 PM (5 years ago)
Author:
alain
Message:

Fix several bugs to use the instruction MMU in kernel mode
in replacement of the instruction address extension register,
and remove the "kentry" segment.

This version is running on the tsar_generic_iob" platform.

One interesting bug: the cp0_ebase defining the kernel entry point
(for interrupts, exceptions and syscalls) must be initialized
early in kernel_init(), because the VFS initialisation done by
kernel_ini() uses RPCs, and RPCs uses Inter-Processor-Interrup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/user/sort/sort.c

    r623 r624  
    305305    }
    306306
    307     printf("\n\n[sort] main starts / %d threads / %d items / pid %x / cycle %d\n",
     307    printf("\n[sort] main starts / %d threads / %d items / pid %x / cycle %d\n",
    308308    total_threads, ARRAY_LENGTH, getpid(), (unsigned int)start_cycle );
    309309
     
    467467
    468468// register results to file
    469 fprintf( stream , "\n----- %s -----\n"
    470                   " - sequencial : %d cycles\n"
    471                   " - parallel   : %d cycles\n",
    472          name, sequencial, parallel );
     469int ret = fprintf( stream , "\n----- %s -----\n"
     470                            " - sequencial : %d cycles\n"
     471                            " - parallel   : %d cycles\n", name, sequencial, parallel );
     472if( ret < 0 )
     473{
     474    printf("\n[sort error] cannot write to instrumentation file <%s>\n", name );
     475    exit(0);
     476}
    473477
    474478// close instrumentation file
Note: See TracChangeset for help on using the changeset viewer.