Ignore:
Timestamp:
Nov 19, 2020, 11:45:52 PM (4 years ago)
Author:
alain
Message:

1) Introduce up to 4 command lines arguments in the KSH "load" command.
These arguments are transfered to the user process through the
argc/argv mechanism, using the user space "args" vseg.

2) Introduce the named and anonymous "pipes", for inter-process communication
through the pipe() and mkfifo() syscalls.

3) Introduce the "chat" application to validate the two above mechanisms.

4) Improve printk() and assert() fonctions in printk.c.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/syscalls/sys_fbf.c

    r657 r670  
    5454#if DEBUG_SYS_FBF
    5555if( DEBUG_SYS_FBF < tm_start )
    56 printk("\n[%s] thread[%x,%x] enter for %s / arg1 %x / arg2 %x / arg3 %x / cycle %d\n",
     56printk("\n[%s] thread[%x,%x] %s / a1 %x / a2 %x / a3 %x / cycle %d\n",
    5757__FUNCTION__, process->pid, this->trdid, dev_fbf_cmd_str( operation ),
    5858arg1, arg2, arg3, (uint32_t)tm_start );
     
    203203        }
    204204        ///////////////////////
     205        case FBF_ACTIVE_WINDOW:
     206        {
     207            uint32_t  wid    = arg1;
     208            uint32_t  active = arg2;
     209
     210            // call relevant kernel function
     211            error = dev_fbf_active_window( wid , active );
     212               
     213            if( error )
     214            {
     215
     216#if DEBUG_SYSCALLS_ERROR
     217printk("\n[ERROR] in %s : cannot %s / thread[%x,%x]\n",
     218__FUNCTION__ , dev_fbf_cmd_str(operation), process->pid, this->trdid );
     219#endif
     220                this->errno = EINVAL;
     221            }
     222            break;
     223        }
     224        ///////////////////////
    205225        case FBF_DELETE_WINDOW:
    206226        {
     
    214234
    215235#if DEBUG_SYSCALLS_ERROR
    216 printk("\n[ERROR] in %s : cannot delete window for %s / thread[%x,%x]\n",
     236printk("\n[ERROR] in %s : cannot %s / thread[%x,%x]\n",
    217237__FUNCTION__ , dev_fbf_cmd_str(operation), process->pid, this->trdid );
    218238#endif
     
    237257
    238258#if DEBUG_SYSCALLS_ERROR
    239 printk("\n[ERROR] in %s : cannot refresh window for %s / thread[%x,%x]\n",
     259printk("\n[ERROR] in %s : cannot %s / thread[%x,%x]\n",
    240260__FUNCTION__ , dev_fbf_cmd_str(operation), process->pid, this->trdid );
    241261#endif
     
    258278
    259279#if DEBUG_SYSCALLS_ERROR
    260 printk("\n[ERROR] in %s : cannot move window / thread[%x,%x]\n",
     280printk("\n[ERROR] in %s : cannot %s / thread[%x,%x]\n",
    261281__FUNCTION__ , dev_fbf_cmd_str(operation), process->pid, this->trdid );
    262282#endif
     
    279299
    280300#if DEBUG_SYSCALLS_ERROR
    281 printk("\n[ERROR] in %s : cannot move window / thread[%x,%x]\n",
     301printk("\n[ERROR] in %s : cannot %s / thread[%x,%x]\n",
     302__FUNCTION__ , dev_fbf_cmd_str(operation), process->pid, this->trdid );
     303#endif
     304                this->errno = EINVAL;
     305            }
     306            break;
     307        }
     308        //////////////////////
     309        case FBF_FRONT_WINDOW:
     310        {
     311            uint32_t  wid = arg1;
     312
     313            // call relevant kernel function
     314            error = dev_fbf_front_window( wid );
     315               
     316            if( error )
     317            {
     318
     319#if DEBUG_SYSCALLS_ERROR
     320printk("\n[ERROR] in %s : cannot %s / thread[%x,%x]\n",
    282321__FUNCTION__ , dev_fbf_cmd_str(operation), process->pid, this->trdid );
    283322#endif
Note: See TracChangeset for help on using the changeset viewer.