ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.c
(Generate patch)

Comparing libev/ev.c (file contents):
Revision 1.35 by root, Thu Nov 1 11:55:54 2007 UTC vs.
Revision 1.37 by root, Thu Nov 1 13:33:12 2007 UTC

1/* 1/*
2 * libev event processing core, watcher management
3 *
2 * Copyright (c) 2007 Marc Alexander Lehmann <libev@schmorp.de> 4 * Copyright (c) 2007 Marc Alexander Lehmann <libev@schmorp.de>
3 * All rights reserved. 5 * All rights reserved.
4 * 6 *
5 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 8 * modification, are permitted provided that the following conditions are
45#include <sys/wait.h> 47#include <sys/wait.h>
46#include <sys/time.h> 48#include <sys/time.h>
47#include <time.h> 49#include <time.h>
48 50
49#ifndef EV_USE_MONOTONIC 51#ifndef EV_USE_MONOTONIC
50# ifdef CLOCK_MONOTONIC
51# define EV_USE_MONOTONIC 1 52# define EV_USE_MONOTONIC 1
52# endif 53#endif
54
55#ifndef CLOCK_MONOTONIC
56# undef EV_USE_MONOTONIC
57# define EV_USE_MONOTONIC 0
53#endif 58#endif
54 59
55#ifndef EV_USE_SELECT 60#ifndef EV_USE_SELECT
56# define EV_USE_SELECT 1 61# define EV_USE_SELECT 1
57#endif 62#endif
761/*****************************************************************************/ 766/*****************************************************************************/
762 767
763void 768void
764ev_io_start (struct ev_io *w) 769ev_io_start (struct ev_io *w)
765{ 770{
766 if (ev_is_active (w))
767 return;
768
769 int fd = w->fd; 771 int fd = w->fd;
772
773 if (ev_is_active (w))
774 return;
770 775
771 assert (("ev_io_start called with negative fd", fd >= 0)); 776 assert (("ev_io_start called with negative fd", fd >= 0));
772 777
773 ev_start ((W)w, 1); 778 ev_start ((W)w, 1);
774 array_needsize (anfds, anfdmax, fd + 1, anfds_init); 779 array_needsize (anfds, anfdmax, fd + 1, anfds_init);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines