Changeset 626 for trunk/user/ksh


Ignore:
Timestamp:
Apr 29, 2019, 7:25:09 PM (6 years ago)
Author:
alain
Message:

This version has been tested on the sort multithreaded application
for TSAR_IOB architectures ranging from 1 to 8 clusters.
It fixes three bigs bugs:
1) the dev_ioc device API has been modified: the dev_ioc_sync_read()
and dev_ioc_sync_write() function use now extended pointers on the
kernel buffer to access a mapper stored in any cluster.
2) the hal_uspace API has been modified: the hal_copy_to_uspace()
and hal_copy_from_uspace() functions use now a (cxy,ptr) couple
to identify the target buffer (equivalent to an extended pointer.
3) an implementation bug has been fixed in the assembly code contained
in the hal_copy_to_uspace() and hal_copy_from_uspace() functions.

File:
1 edited

Legend:

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

    r625 r626  
    1515// The children processes are created by the <load> command, and are
    1616// attached to the same TXT terminal as the parent KSH process.
    17 // A child process can be lauched in foreground or in background:
     17// A child process can be launched in foreground or in background:
    1818// . when the child process is launched in foreground, the KSH process loses
    1919//   the TXT terminal ownership, that is transfered to the child process.
     
    391391    if( argc < 2 )
    392392    {
    393         printf("  usage: display  vmm      cxy    pid\n"
    394                "         display  sched    cxy    lid\n"             
     393        printf("  usage: display  vmm      cxy      pid\n"
     394               "         display  sched    cxy      lid\n"             
    395395               "         display  process  cxy\n"             
    396396               "         display  txt      txtid\n"             
     
    398398               "         display  chdev\n"             
    399399               "         display  dqdt\n"             
    400                "         display  locks    pid    trdid\n"
     400               "         display  locks    pid      trdid\n"
    401401               "         display  barrier  pid\n"
    402                "         display  mapper   path   page_id  nbytes\n");
     402               "         display  mapper   path     page     nbytes\n"
     403               "         display  fat      page     entries\n"
     404               "         display  fat      cxy      0\n");
    403405    }
    404406    ////////////////////////////////////
     
    558560            {
    559561                printf("  error: cannot display page %d of mapper %s\n", page_id, argv[2] );
     562            }
     563        }
     564    }
     565    ///////////////////////////////////////////
     566    else if( strcmp( argv[1] , "fat" ) == 0 )
     567    {
     568        if( argc != 4 )
     569        {
     570                    printf("  usage: display fat page_id nb_entries\n");
     571            }
     572        else
     573        {
     574                unsigned int page_id    = atoi(argv[2]);
     575            unsigned int nb_entries = atoi(argv[3]);
     576
     577            if( display_fat( page_id, nb_entries ) )
     578            {
     579                printf("  error: cannot display page %d of fat\n", page_id );
    560580            }
    561581        }
     
    11411161}  // end execute()
    11421162
     1163
     1164
    11431165///////////////////////////////
    11441166static void interactive( void )
     
    11561178#endif
    11571179
    1158 /* 
    1159 // To lauch one or several commands without interactive mode
     1180/*
     1181// Lauch one or several commands without interactive mode
    11601182
    11611183// 1. first command
     
    11671189else
    11681190{
    1169     printf("\n[ksh] load bin/user/pgcd.elf\n");
     1191    printf("\n[ksh] display fat 0 32\n");
    11701192}
    11711193
    1172 strcpy( cmd , "load bin/user/pgcd.elf" );
     1194strcpy( cmd , "display fat 0 32" );
    11731195execute( cmd );
    11741196
     
    11811203else
    11821204{
    1183     printf("\n[ksh] ls home\n");
     1205    printf("\n[ksh] load bin/user/pgcd.elf\n");
    11841206}
    11851207
    1186 strcpy( cmd , "ls home" );
     1208strcpy( cmd , "load bin/user/pgcd.elf" );
    11871209execute( cmd );
    11881210
Note: See TracChangeset for help on using the changeset viewer.