/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2013 Nexenta Systems, Inc. All rights reserved.
*/
#include <smbsrv/smb_kproto.h>
#include <smbsrv/smb_fsops.h>
#include <smbsrv/smb_vops.h>
#include <smbsrv/smb_idmap.h>
#include <sys/priv_names.h>
#ifdef _FAKE_KERNEL
#else
#endif
/*
* smb_thread_entry_point
*
* Common entry point for all the threads created through smb_thread_start.
* The state of the thread is set to "running" at the beginning and moved to
* "exiting" just before calling thread_exit(). The condition variable is
* also signaled.
*/
static void
{
/* Run the real thread entry point. */
}
/*
* It's tempting to clear sth_did here too, but don't.
* That's needed in thread_join().
*/
zthread_exit();
}
/*
* smb_thread_init
*/
void
char *name,
void *ep_arg,
{
}
/*
* smb_thread_destroy
*/
void
{
}
/*
* smb_thread_start
*
* This function starts a thread with the parameters provided. It waits until
* the state of the thread has been moved to running.
*/
/*ARGSUSED*/
int
{
int rc = 0;
case SMB_THREAD_STATE_EXITED:
rc = -1;
break;
default:
ASSERT(0);
rc = -1;
break;
}
return (rc);
}
/*
* smb_thread_stop
*
* This function signals a thread to kill itself and waits until the "exiting"
* state has been reached.
*/
void
{
case SMB_THREAD_STATE_RUNNING:
break;
}
/* FALLTHROUGH */
case SMB_THREAD_STATE_EXITING:
} else {
}
break;
case SMB_THREAD_STATE_EXITED:
break;
default:
ASSERT(0);
break;
}
}
/*
* smb_thread_signal
*
* This function signals a thread.
*/
void
{
case SMB_THREAD_STATE_RUNNING:
break;
default:
break;
}
}
{
return (result);
}
{
/*
* Setting ticks=-1 requests a non-blocking check. We will
* still block if the thread is in "suspend" state.
*/
return (result);
}
{
return (result);
}
/*
* smb_thread_continue_timedwait_locked
*
* Internal only. Ticks==-1 means don't block, Ticks == 0 means wait
* indefinitely
*/
static boolean_t
{
/* -1 means don't block */
if (ticks == 0) {
} else {
}
}
return (result);
}