#include <deblin/vhal.h>
#include <time.h>
#include <pthread.h>
#include <rtl_ipc.h>
#include <semaphore.h>
#include <rtl_barrier.h>
#include <rtl_printf.h>
#include <rtl_conf.h>
#include <unistd.h>


static unsigned long valor11=0x0;


pthread_t thread11;

unsigned long context_mprot_prueba;

extern unsigned long mprot_prueba;

void *task11(void *arg)
{
  int fd;
  int aux=0;
#if _RTL_POSIX_IO
  DebugString("Estoy en TASK11                               ");
  fd = open("/dev/rt_tty",0);
  while(1)
  {
   write(fd,"Probando RT_TTY\n",16);
   rtl_printf(" El handler %d, valor %d \n",fd,aux);
   aux++;
   usleep(3000000);
//   mprot_prueba = 4;
  };
  close(fd);
#else
  while(1) {};
#endif
  return 0;
};





