Subversion Repositories shark

Rev

Rev 2 | Rev 1063 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed


#include <fs/types.h>
#include <fs/stat.h>
#include <fs/task.h>

#include "file.h"
#include "fs.h"

__mode_t k_umask(__mode_t newmask)
{
  __mode_t oldmask;
  __pid_t pid;

  call_to_fs();
 
  pid=__get_pid();  
  lock_desctable(pid);
  oldmask=*umask_ptr(pid);
  *umask_ptr(pid)=newmask&__ACCESSPERMS;
  unlock_desctable(pid);
  return_from_fs(oldmask);
}