__libc_lock_lock (dirp->lock);
__closedir (DIR *dirp){  int fd;  if (dirp == NULL)    {      __set_errno (EINVAL);      return -1;    }  __libc_lock_lock (dirp->lock);  fd = dirp->fd;  __libc_lock_fini (dirp->lock);  free ((void *) dirp);  return __close (fd);}