Call 'awk' instead of 'gawk' for cross-platform compatibility.

Call `awk` instead of `gawk` for cross-platform compatibility. Linux systems normally have a symbolic link from `awk` to `gawk`, so there should be no difference in the functionality on those systems.
Revert "Merge pull request #622 from killabytenow/master"

This reverts commit 392bae3c453763e8f887f447678ab0202a36228a, reversing
changes made to 61cd9ee8b63bdd34fd3b5ebd58f2de3fce507a61.
Merge pull request #700 from jack-pappas/patch-1

Call 'awk' instead of 'gawk' for cross-platform compatibility.
There was a long discussion on a mailing list about the async-socket problem
in mono. We have previously submitted a patch fixing the problem, however it
was later reverted back as causing deadlocks in some cases.

This patch is very close to the original one, but it takes into account how
tpool-thread operates and avoids deadlocks in this code. (Unfortunately, it
probably makes the code a little less readable, but it works).

So, this patch aims to fix several races in the mono code. These problems are
not relevant for a lot of applications as they can appear only if both read
and write operations are active on the socket. (I.e. RPC style communications
do not trigger the problem).

So, there are two major problems with existing mono code:

a) threadpool.c :: socket_io_add

LeaveCriticalSection (&data->io_lock);
data->modify (data->event_data, fd, state->operation, ievt, is_new);

the problem is that data modify receives ievt and is_new arguments which
may be already outdated due to the concurrent operation on the same socket
(read vs. write).

(If you look at the other part of the operation in
tpool_epoll.c :: tp_epoll_wait updates the epoll settigs under the lock.)

b) The epoll implementation uses the following code to change the epoll
settings in the data->modify handler.

if (epoll_ctl (data->epollfd, epoll_op, fd, &evt) == -1) {
  int err = errno;
  if (epoll_op == EPOLL_CTL_ADD && err == EEXIST) {
    epoll_op = EPOLL_CTL_MOD;
    if (epoll_ctl (data->epollfd, epoll_op, fd, &evt) == -1) {
      g_message ("epoll_ctl(MOD): %d %s", err, g_strerror (err));
    }
  }
}

Here we have the same problem. If concurrent operation updates epoll between
first epoll_ctl and the second epoll_ctl the second will override concurrent
update.

These problems result in missing callbacks on async socket send or receive
completion

The original idea was as simple as just move the data->modify under the lock.
(NOTE: both internal associated list and epoll are updated under the lock in
case of data->wait (see tp_epoll_wait).

As i already noted it causes a problem for tpool_poll.c implementation as it
uses different approach than epoll/kqueue.

This patch still invokes data->modify under the lock, but allow implementation
to release lock at the point where it is appropriate for the given
implementation.

The tpool-poll.c releases lock immediately and thus its behavior remains
unchanged (and it still has a problem of missing send/receive callbacks)

The tpool-epoll/kqueue implementations update their internal structures and
corresponding OS level structures under the locks (as _wait does). This change
makes them reliable in simultaneous socket read/write scenarios.

The following code demonstrates the problem. See readme inside.

https://github.com/ysw/mono-socket-problem/tree/master/SocketTest

NOTE: you need at least 4 coresto reliably reproduce the problem.

It is quite hard to reproduce on OSX, but it is easy reproducible in LINUX.

This commit is licensed under MIT/X11.
Implement webrequest cancellation. Fixes #13200
Fix gshared synchronized wrappers for static methods.
Remove test-sgen from make check in tests/, it takes too much time.
Avoid using dmb/dsb/dib instructions on ARM v6.

This only worked by accident before the HAVE_ARMV<N>
changes because __ARM_ARCH_6__ is never defined by
any compiler.
Bump master version to 3.3.0.
[runtime] Add a fallback on the TLS probing code that does a range scan in the pthread structure.
Put the unbox_trampolines table into the .text segment instead of .rodata on mt since it contains code.
Escape the .file path name generated in the asembly code. clang does not mind, but gcc does
Fix synchronized_generic_cache.
Make wrappers whose signature is static static.
Avoid an assert in mono_save_seq_point_info () if no seq points are generated for a method, as in wrappers in android. Hopefully fixes #12995.
Fixes scheduling of non-inlined sychronous continuations.
Remove redundant status capturing
Fix a crash in thread_suspend_func () if the thread has no tls set.
Fix the dependencies of the corlib test suite so the test suite is not rebuilt every time.
Fix MONO_GC_DEBUG=collect-before-allocs. mono_gc_alloc_obj_nolock () was not called for the majority of allocations.